NEW
Font size
WorksheetsQuiz on Java
Total questions: 20
Worksheet time: 20mins
Which of the following is a type of polymorphism in Java?
Compile time polymorphism
Execution time polymorphism
Multiple polymorphism
Multilevel polymorphism
Which component is used to compile, debug and execute java program?
JVM
JDK
JIT
JRE
Syntax to compile java program from command prompt
java Filename.java
javac Filename
javac Filename.java
java Filename
Which component is responsible for converting bytecode into machine specific code?
JVM
JDK
JIT
JRE
Which of the following is not a valid Java comment?
/** Comment 1 */
*/ Comment 2 /*
// Comment 3
/* Comment 4 */
When saving a Java source file, save it with an extension of
.java.
.javac.
.src.
.class.
Which of the following is not a rule that must be followed when naming identifiers?
After the first character, you may use the letters a-z, A-Z, an underscore, a dollar sign, or digits 0-9.
Identifiers can contain spaces.
Uppercase and lowercase characters are distinct.
The first character must be one of the letters a-z, A-Z, an underscore or a dollar sign.
To print "Hello, world" on the monitor, use the following Java statement:
System.out.println("Hello, world");
System Print = "Hello, world";
SystemOutPrintln('Hello, world');
system.out.println{Hello, world};
Which company owns Java?
Oracle
Microsoft
Apple
Intel
Who invented Java?
James Gosling
Sergey Brin
Steve Jobs
Bill Gates
Tim Berners-Lee
Java was originally named:
Coffee
Oak
New C++
Duke
Which of this keyword must be used to inherit a class?
super
this
extend
extends
Which of these statement is incorrect?
Every class must contain a main() method
Applets do not require a main() method at all
There can be only one main() method in a program
main() method must be made public
What is the extension of compiled java classes?
.java
.class
.txt
.js
Where does a java program start executing instructions from:
class
source file
main method
object
Which of these keywords is used to make a class?
class
struct
int
none of the mentioned
Which of the following is a type of polymorphism in Java?
Compile time polymorphism
Execution time polymorphism
Multiple polymorphism
Multilevel polymorphism
Which of the following is not OOPS concept in Java?
Inheritance
Encapsulation
Polymorphism
Compilation
