Online GK Series

This site is dedicated to the aspirants of competitive exams SSC, UPSC, Railways, Postal Assistants, Bank, GATE and NET

Basic Java Objective Interview Questions and Answers

6 The order of the three top level elements of the java source file are
A Import, Package, Class
B Class, Import, Package
C Package, Import, Class
D Random order

Answer: Option [C]
7 The minimum value of char type variable is
A ‘\u0020’
B ‘\u00ff’
C ‘\u0010’
D ‘\u0000’

Answer: Option [D]

'\u0000' i.e. 0 is the minimum value of the char type varibale in java

8 Java uses ___ to represent characters
A ASCII code
B Unicode
C Byte code
D None of the above

Answer: Option [B]
9 Which one is not supported by OOP?
A Abstraction
B Polymorphism
C Encapsulation
D Global variables

Answer: Option [D]

Four major principles of object oriented programming are Abstraction, Encapsulation, Inheritance and Polymorphism

10 Java programs are
A Platform-dependent
B Interpreter-dependent
C Platform-independent
D Interpreter-independent

Answer: Option [C]

Computer Science Books


Please Like Us