61. |
Which one is a valid declaration of a boolean?
|
||||||||
Answer:
Option (c) |
62. |
What will be the output of the following Java program?
class mainclass { public static void main(String args[]) { char a = 'A'; a++; System.out.print((int)a); } }
|
||||||||
Answer:
Option (a) |
63. |
What will be the output of the following Java code?
class asciicodes { public static void main(String args[]) { char var1 = 'A'; char var2 = 'a'; System.out.println((int)var1 + " " + (int)var2); } }
|
||||||||
Answer:
Option (b) |
64. |
Which of these is long data type literal?
|
||||||||
Answer:
Option (a) |
65. |
Which of these can be returned by the operator &?
|
||||||||
Answer:
Option (d) |
66. |
Which of these can not be used for a variable name in Java?
|
||||||||
Answer:
Option (b) |
67. |
What will be the output of the following Java program?
class variable_scope { public static void main(String args[]) { int x; x = 5; { int y = 6; System.out.print(x + " " + y); } System.out.println(x + " " + y); } }
|
||||||||
Answer:
Option (d) |
68. |
Which of these is an incorrect string literal?
|
||||||||
Answer:
Option (d) |
69. |
Which of these is necessary condition for automatic type conversion in Java?
|
||||||||
Answer:
Option (b) |
70. |
What will be the error in the following Java code?
byte b = 50; b = b * 50;
|
||||||||
Answer:
Option (b) |