Java Multiple Choice Questions
1. Java is developed by ____________________.
A.Sun MicrosystemsB.Adobe
C.Microsoft
D.Facebook
2. ___________ is one of the java features that enables java program to run anywhere anytime.
A.Object-OrientedB.Multithreading
C.Platform-Independent
D.Case Sensitive
3. Java compiler translates source code into _____________
A. Bytecode (Virtual Machine Code)B.Bitcode
C.Machine level code
D.none
4. input .java file is compiled into ____________ file as output by java compiler.
A..exeB..jar
C..class
D..out
5. The name of the Java Compiler is______________.
A.Turbo JavaB.javac
C.java
D.jvm
6. What is a feature of Java Programming Language?
A.Security and Case-SensitiveB.Architectural neutral and Platform independent
C.Multithreading and Automatic Garbage Collection
D.all of the above
7. Java is a _____________ programming language.
A.interpretedB.compiled
C.interpreted and compiled both
D.translated
8. What is true about Class in java?
A.A class has attributes and methodsB.A Class can be considered as factory for producing the objects having same attributes and methods with different states
C.A Class can be declared with public or default modifier
D.All of the above
9. Which of the following is not assignment operator?
A.+=B.==
C.%=
D.=
10. __________ variables and methods can be called without using the objects
A.staticB.final
C.abstract
D.public
11. Which of the following statements is true?
A.Java supports operator overloadingB.Java supports interfaces
C.Java supports pointers
D.Java supports multiple inheritance
12. __________ is a special method in java that enables an object to initialize itself when it is created
A.new()B.this()
C.constructor
D.super()
13. ______ is an implicit reference created by the runtime itself referring to the current object itself.
A.superB.this
C.that
D.new
14. We cannot create a subclass of _________ class.
A.abstractB.static
C.final
D.private
15. ________ allows to dynamically allocate memory for the object on heap space and create object reference on the heap stack.
A.this keywordB.new keyword
C.constructor
D.main() method