static void nPnrtString message int n whilen 0 Systemoutp

static void nPnrt(String message, int n) { while(n > 0) { System.out.print(message); n--; } } What is the printout of the call nPrint(\"b\", 3.0)? a. aaaaa b. aaaa c. aaa

Solution

answer is d invalid call as call is trying to pass a double when int is expected (incompatible types: possible lossy conversion from double to int)

 static void nPnrt(String message, int n) { while(n > 0) { System.out.print(message); n--; } } What is the printout of the call nPrint(\

Get Help Now

Submit a Take Down Notice

Tutor
Tutor: Dr Jack
Most rated tutor on our site