Java Unit 1

Java Unit 1

University

10 Qs

quiz-placeholder

Similar activities

JSP

JSP

University

10 Qs

Java Quiz 1

Java Quiz 1

University

10 Qs

Basic Java

Basic Java

University

15 Qs

QUIZ PBO 2021

QUIZ PBO 2021

University

12 Qs

Polymorphism

Polymorphism

University

6 Qs

Java Inheritance

Java Inheritance

11th Grade - University

10 Qs

Unit 1 - Classes and Objects

Unit 1 - Classes and Objects

University

10 Qs

Topik 2: Ciri-ciri Object Oriented Programming (OOP)

Topik 2: Ciri-ciri Object Oriented Programming (OOP)

University

10 Qs

Java Unit 1

Java Unit 1

Assessment

Quiz

Computers

University

Hard

Created by

Gunjan Verma

FREE Resource

10 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which of the following is NOT an OOP principle?

Encapsulation

Abstraction

Compilation

Inheritance

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is an object in Java?

a) A variable

b) An instance of a class

c) A function

d) A primitive data type

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the main purpose of encapsulation?

a) To allow direct access to all variables

b) To hide the implementation details of a class

c) To inherit properties from another class

d) To create multiple objects

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is polymorphism in Java?

a) Multiple classes with the same name

b) Ability of a variable to hold multiple types

c) Ability of a method to behave differently based on the object calling it

d) The use of multiple objects in a program

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which of the following is NOT a characteristic of Java?

a) Platform independent

b) Supports multiple inheritance through classes

c) Object-oriented

d) Secure

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the Java Virtual Machine (JVM)?

a) A compiler

b) A runtime environment for Java programs

c) A debugger

d) An integrated development environment

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the correct syntax for a single-line comment in Java?

a) /* comment */

b) // comment

c) -- comment

d) # comment

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?