Engineering Full Stack Apps with Java and JavaScript
What will the following code print when compiled and run:
public class TestClass { public static void main(String[] args){ int k = 2; do{ System.out.println(k); }while(--k>0); } }
Select 1 option
A. 1
B. 1
0
C. 2
1
D. 2
1
0
E. It will keeping printing numbers in an infinite loop.
F. It will not compile.