Search Header Logo

Test 1 (class,object,constructor,this)

Authored by Prof. Wadhwani

Computers

University

Used 5+ times

Test 1 (class,object,constructor,this)
AI

AI Actions

Add similar questions

Adjust reading levels

Convert to real-world scenario

Translate activity

More...

    Content View

    Student View

50 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

20 sec • 1 pt

What is a class in Java?

A variable
A method
A blueprint of objects
An object

2.

MULTIPLE CHOICE QUESTION

20 sec • 1 pt

What is an object in Java?

A variable
An instance of a class
A method
A loop

3.

MULTIPLE CHOICE QUESTION

20 sec • 1 pt

Which operator is used to create an object in Java?

new
create
alloc
malloc

4.

MULTIPLE CHOICE QUESTION

20 sec • 1 pt

Which of these is a correct way to create an object?

Student s = Student();
Student s = new Student;
Student s = new Student();
Student s();

5.

MULTIPLE CHOICE QUESTION

20 sec • 1 pt

Can a class have multiple objects?

No
Yes
Only one
Depends on JVM

6.

MULTIPLE CHOICE QUESTION

20 sec • 1 pt

What does the `main` method represent?

A class
An object
A constructor
An entry point of the program

7.

MULTIPLE CHOICE QUESTION

20 sec • 1 pt

What is the access modifier commonly used for class variables?

public
private
protected
all of the above

Access all questions and much more by creating a free account

Create resources

Host any resource

Get auto-graded reports

Google

Continue with Google

Email

Continue with Email

Classlink

Continue with Classlink

Clever

Continue with Clever

or continue with

Microsoft

Microsoft

Apple

Apple

Others

Others

Already have an account?

Discover more resources for Computers