Java Unit 1

Java Unit 1

University

10 Qs

quiz-placeholder

Similar activities

Structure of Java Program

Structure of Java Program

University

10 Qs

Java Basic Programming Quiz

Java Basic Programming Quiz

University

10 Qs

Java basic

Java basic

12th Grade - University

12 Qs

java quiz based on interface

java quiz based on interface

University

10 Qs

Unit 2 Inheritance in Java

Unit 2 Inheritance in Java

12th Grade - University

15 Qs

002_Java Methods

002_Java Methods

12th Grade - University

15 Qs

Java Prelab-IV

Java Prelab-IV

University

10 Qs

Basics of JAVA

Basics of JAVA

University

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