Java -Assessment Milestone -1

Java -Assessment Milestone -1

University

65 Qs

quiz-placeholder

Similar activities

Salesforce Test 1 For Ranking

Salesforce Test 1 For Ranking

University

68 Qs

WS301 - Quiz

WS301 - Quiz

University

70 Qs

Algorithm, Flowchart & Pseudocode

Algorithm, Flowchart & Pseudocode

University - Professional Development

66 Qs

Summative Test- Nursing Informatics

Summative Test- Nursing Informatics

University

60 Qs

AI-900 Azure AI Fundamentals

AI-900 Azure AI Fundamentals

University

60 Qs

Fundamentos de programación

Fundamentos de programación

10th Grade - University

68 Qs

HTML & CSS

HTML & CSS

University

60 Qs

1ºDAM/DAW - Sistemas Informáticos - UD5-UD7 - Prof. C. Boni

1ºDAM/DAW - Sistemas Informáticos - UD5-UD7 - Prof. C. Boni

University - Professional Development

70 Qs

Java -Assessment Milestone -1

Java -Assessment Milestone -1

Assessment

Quiz

Computers

University

Practice Problem

Hard

Created by

Vijaya Kumar DTT

Used 2+ times

FREE Resource

AI

Enhance your content in a minute

Add similar questions
Adjust reading levels
Convert to real-world scenario
Translate activity
More...

65 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the primary difference between JDK and JRE?

JDK is for development, JRE is for running Java programs

JRE includes JVM, JDK does not

JDK is platform-independent, JRE is not

JRE is for development, JDK is for running Java programs

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which of the following is true about encapsulation in Java?

It allows direct access to class variables

It hides the internal state of an object and provides access through methods

It prevents inheritance

It is used to achieve polymorphism

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What will be the output of the following code? java public class Test { public static void main(String[] args) { String s = "Java"; s.concat(" Programming"); System.out.println(s); } }

Java Programming

Java

Null

Compilation Error

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which keyword is used to prevent a method from being overridden?

static

final

abstract

synchronized

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What happens if a try block does not have a catch block?

Compilation error

Runtime error

The program executes normally if no exception occurs

The program always terminates

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the primary purpose of encapsulation in Java?

To allow direct access to class variables

To hide the internal state of an object and provide controlled access

To enable multiple inheritance

To prevent method overriding

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which keyword is used to inherit a class in Java?

implements

extends

super

this

Create a free account and access millions of resources

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

By signing up, you agree to our Terms of Service & Privacy Policy

Already have an account?