Computer Applications
Related Questions
If
String x = "Computer"; String y = "Science";
What will the following return?
(a) System.out.print(x.substring(2,6));
(b) System.out.print(x.indexOf(x.charAt(5)));
State the type of errors, if any in the following statements.
(a)
switch (x < 2)
(b)
int a = 100, b = 0; System.out.println (a / b);
What will be the output of the following code?
int num = 10; if (num < 20) System.out.print(num++); else System.out.print(--num);