Java Test2

Java Test2

University

50 Qs

quiz-placeholder

Similar activities

Python El Grand Revision!

Python El Grand Revision!

University

47 Qs

IUTCS Freshers

IUTCS Freshers

University

50 Qs

DMTD Revision 2.0

DMTD Revision 2.0

University

45 Qs

webdev ii

webdev ii

University

52 Qs

Mendix Quiz Unit II

Mendix Quiz Unit II

University

50 Qs

Programming Test 1

Programming Test 1

University

51 Qs

2EB Quiz 04 Dec 2024

2EB Quiz 04 Dec 2024

University

50 Qs

Java Language Quiz

Java Language Quiz

University

50 Qs

Java Test2

Java Test2

Assessment

Quiz

Computers

University

Hard

Created by

Prof. Harish T. Gwalani

Used 2+ times

FREE Resource

50 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the default value of an object reference in Java?
0
null
undefined
empty

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which keyword is used to create an object in Java?
create
class
new
object

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What does a constructor do in Java?
Destroys an object
Allocates memory
Initializes an object
Calls methods

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which keyword is used to define a class in Java?
define
struct
class
object

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the return type of a constructor?
void
int
class type
None

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which method is called automatically when an object is created?
init()
constructor
main()
finalize()

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

How many constructors can a class have?
Only one
Two
Unlimited
None

Create a free account and access millions of resources

Create resources
Host any resource
Get auto-graded reports
or continue with
Microsoft
Apple
Others
By signing up, you agree to our Terms of Service & Privacy Policy
Already have an account?