Java MCQs - All MCQs
History, JVM, JRE and JDK, Variables, Data Types, Operators, Control Statements, Iterative Statements, Object Class, Naming conventions, Constructors
11. What is the correct output of this program ?
A. 10987654321
B. 987654321
C. 123456789
D. 12345678910
View Answer
12. Which is the right naming convention for Variable in Java?
A. double GrossSalary;
B. double grossSalary;
C. double gross_salary;
D. All of above
View Answer
13. What the naming convention should be for Interfaces in Java?
A. It should start with the uppercase letter.
B. It should be an adjective such as Intelligent, Acceptable
C. Use appropriate words, instead of acronyms.
D. All of above
View Answer
14. A name of variable is known as
A. Data Type
B. Constant
C. Identifier
View Answer
15. Do we follow camel-case syntax for naming the class, interface, method, and variable?
A. Yes
B. No
View Answer
16. Java ME stands for ?
A. Java Enterprise Edition
B. Java Standard Edition
C. Java Micro Edition
D. None of Above
View Answer
17. Which are the arithmetic operators ?
A. * / %
B. + -
C. All of above
View Answer
18. Which are the relational operators ?
A. < <=
B. > >= instanceof
C. == !=
D. All of Above
View Answer
19. What is the correct output of this program ?
A. A2 A2 A3 Default
B. A2
C. A2 A3 Default
D. Default
View Answer
20. Which kind of Java programming is?
A. Procedural
B. Non-Procedural
C. Object Oriented
D. Event Driven
View Answer
