Java Unit 1

Java Unit 1

University

10 Qs

quiz-placeholder

Similar activities

FOS Ch:2 Part II (QUIZ 6)

FOS Ch:2 Part II (QUIZ 6)

University

10 Qs

keistimewaan OOP

keistimewaan OOP

University

15 Qs

Simple Quiz on Java Programming

Simple Quiz on Java Programming

University

10 Qs

JAVA I/O

JAVA I/O

University

10 Qs

Programming Quiz

Programming Quiz

University

10 Qs

Java

Java

University

11 Qs

AP CSA Inheritance Polymorphism

AP CSA Inheritance Polymorphism

University

10 Qs

Clean Code

Clean Code

University

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