wayground logo

Free Printable Worksheets

Font size

S
M
L
XL
Worksheets

Java Quiz 1

Total questions: 12

Worksheet time: 6mins

Name
Class
Date
1.
Name
4 lines
2.
E mail
4 lines
3.
Q1: Java is designed by
a)
A. Dennis Ritchie
b)
B. James Gosling
c)
C. Charles Babbage
d)
D. Guido van Rossum
4.
Q 2 - What is correct syntax for main method of a java class?
a)
A - public static int main(String[] args)
b)
B - public int main(String[] args)
c)
C - public static void main(String[] args)
d)
D - None of the above.
5.
3: Java influenced by
a)
A. C++
b)
B. Objective-C
c)
C. Ada
d)
D. All the above
6.
4:. Which component is used to compile, debug and execute the java programs?
a)
a) JRE
b)
b) JIT
c)
c) JDK
d)
d) JVM
7.
5. Which one of the following is not a Java feature?
a)
a) Object-oriented
b)
b) Use of pointers
c)
c) Portable
d)
d) Dynamic and Extensible
8.
6. What is a correct syntax to output "Hello World" in Java?
a)
a) print ("Hello World")
b)
b) echo("Hello World")
c)
c) System.out.println("Hello World")
d)
d) Console.WriteLine("Hello World
9.
7. What is the extension of compiled java classes?
a)
a) .txt
b)
b) .js
c)
c) .class
d)
d) .java
10.
8. Which statement is true about Java?
a)
a) Java is a sequence-dependent programming language
b)
b) Java is a code dependent programming language
c)
c) Java is a platform-dependent programming language
d)
d) Java is a platform-independent programming language
11.
9. Which one of the following is not a Java feature?
a)
a) Object-oriented
b)
b) Use of pointers
c)
c) Portable
d)
d) Dynamic and Extensible
12.
10.What does the "static" keyword mean in Java?
a)
It makes a variable non-modifiable.
b)
It creates a new object of a class.
c)
It allows a method or variable to be accessed without creating an instance of the class.
d)
It specifies that a class is abstract.