Day 2 - Java Test (class, object, static)

Day 2 - Java Test (class, object, static)

University

50 Qs

quiz-placeholder

Similar activities

Quiz 1 PBO

Quiz 1 PBO

University

48 Qs

Milestone 2

Milestone 2

University

50 Qs

C# and DotNet Framework

C# and DotNet Framework

University

50 Qs

Java Test2

Java Test2

University

50 Qs

Day 6

Day 6

University

50 Qs

PF201: SCCPF2012223

PF201: SCCPF2012223

University

50 Qs

Event Driven Handouts 1 & 2

Event Driven Handouts 1 & 2

University

45 Qs

JAVA REVIEW QUIZ

JAVA REVIEW QUIZ

University

48 Qs

Day 2 - Java Test (class, object, static)

Day 2 - Java Test (class, object, static)

Assessment

Quiz

Computers

University

Hard

Created by

Prof. Karale

Used 2+ times

FREE Resource

50 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

20 sec • 1 pt

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

2.

MULTIPLE CHOICE QUESTION

20 sec • 1 pt

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

3.

MULTIPLE CHOICE QUESTION

20 sec • 1 pt

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

4.

MULTIPLE CHOICE QUESTION

20 sec • 1 pt

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

5.

MULTIPLE CHOICE QUESTION

20 sec • 1 pt

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

6.

MULTIPLE CHOICE QUESTION

20 sec • 1 pt

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

7.

MULTIPLE CHOICE QUESTION

20 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?