Question 1
Which keyword is used to return a value inside a method?
A
break
B
void
C
get
D
return
Question 2
Which of these packages contains all the collection classes?
A
java.lang
B
java.util
C
java.net
D
java.awt
Question 3
Which operator can be used to compare two values?
A
><
B
==
C
=
D
<>
Question 4
Which concept allows multiple methods to have the same name but different parameters?
A
Method overriding
B
Method overloading
C
Encapsulation
D
Abstraction
Question 5
What is the correct way to create an object called myObj of MyClass?
A
class myObj = new MyClass();
B
MyClass myObj = new MyClass();
C
new myObj = MyClass();
D
class MyClass = new myObj();