NEW
Font size
WorksheetsJAVA Round 1
Total questions: 25
Worksheet time: 13mins
Which of the following is used to print output in Java?
cout
print()
System.out.println()
echo
Which keyword is used to create a class in Java?
class
define
struct
object
Which data type is used to store whole numbers?
float
double
int
char
Which method is the entry point of Java program?
start()
main()
run()
init()
Which symbol is used to end a statement in Java?
:
;
,
.
Which of the following is not a Java keyword?
static
void
public
include
Which operator is used for addition?
*
+
-
/
Which package contains Scanner class?
java.io
java.lang
java.util
java.net
Which keyword is used to inherit a class?
implement
inherit
extends
super
Which loop executes at least once?
for
while
do-while
if
Which data type stores true or false?
int
boolean
char
float
Which keyword is used to create an object?
new
create
make
object
Which of the following is used to take input from user?
BufferedReader
Scanner
InputStream
All of the above
Which access modifier allows access everywhere?
private
protected
default
public
Which operator compares two values?
=
==
++
!=
Which class is the parent of all Java classes?
Main
Object
System
String
Which keyword stops a loop?
stop
break
exit
return
Which array index starts in Java?
0
1
-1
Which of these is a wrapper class?
int
float
Integer
char
Which of these is not an OOP concept?
Inheritance
Polymorphism
Compilation
Encapsulation
Which keyword is used to make a constant?
static
final
const
fixed
Which collection does not allow duplicate values?
List
Set
ArrayList
Vector
Which operator is used for logical AND?
&
&&
||
!
Which Java feature allows method overriding?
Abstraction
Polymorphism
Inheritance
Encapsulation
Which JVM component loads classes?
Interpreter
Compiler
Class Loader
Garbage Collector
