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);}}
66
67
65
64
Q.3.
What will be the output of the following Java program?class array_output { public static void main(String args[]) { char array_variable [] = new char[10]; for (int i =i <++i) { array_variable[i] = 'i'; System.out.print(array_variable[i] + "" ); i++; } } }
i i i i i
0 1 2 3 4
i j k l m
None of the mentioned
Q.4.
Command to compile Java program
javax
javay
javac
Java
Q.5.
A ___________ file is created after successful compilation of a Java program.
Object file
Array file
Class file
String file
Q.6.
Which one is a valid declaration of a boolean?
boolean b1 = 1;
boolean b2 = ‘false’;
boolean b3 = false;
boolean b4 = ‘true’
Q.7.
Java program is
Interpreted
Compiled
Q.8.
Which of these values can a boolean variable contain?
True & False
0 & 1
Any integer value
true
Q.9.
The name of the following should be the file name in Java
Object Name
Variable Nam
Class Name
Array Name
Q.10.
Java is a
Procedure Oriented Language
Structure Oriented Language
Object_Oriented Language
Machine Language
Q.11.
Which provides runtime environment for java byte code to be executed?
JDK
JVM
JRE
JAVAC
Q.12.
Java language was initially called as ________
Sumatra
J++
Oak
Pine
Q.13.
Data type long literals are appended by _____
Uppercase L
Lowercase L
Long
Both Uppercase L & Lowercase L
Q.14.
Command to execute compiled java program is
java
javac
run
javaw
Q.15.
String s1 = new String("java");String s2 = new String("JAVA");System.out.println(s1 = s2);
JAVA
java
true
false
Q.16.
The command javac
Converts a java program into binary code
Converts a java program into bytecode
Converts a java program into machine language
None of the above.
Q.17.
Which of the following are not Java keywords ?
double
switch
then
instanceof
Q.18.
String s = "Java"+1+2+"Quiz"+""+(3+4);System.out.println(s);