Question: How many times would hello print when the following code executes? public class printHello { public static void main(String[] args) { int counter =
How many times would "hello" print when the following code executes? public class printHello { public static void main(String[] args) { int counter = 0; while(counter < 10) { } } System.out.println("hello"); counter += 2; }
Step by Step Solution
There are 3 Steps involved in it
public class PrintHello public static void mainString args int counter 0 while counter 10 Systemoutp... View full answer
Get step-by-step solutions from verified subject matter experts
