JAVA - Day1

JAVA - Day1

University

23 Qs

quiz-placeholder

Similar activities

2.2 Data Transmission

2.2 Data Transmission

University

18 Qs

Jaringan Komputer dan Internet

Jaringan Komputer dan Internet

11th Grade - University

20 Qs

Tools and Shortcut Quiz - BSIS II A

Tools and Shortcut Quiz - BSIS II A

University

20 Qs

Lei de Ohm e redes

Lei de Ohm e redes

University

20 Qs

 XI Kuis Analisis Data

XI Kuis Analisis Data

10th Grade - University

20 Qs

AISB223 Chapter 12: Confidentiality and Privacy Controls

AISB223 Chapter 12: Confidentiality and Privacy Controls

University

20 Qs

ARTIFICIAL INTELLIGENCE

ARTIFICIAL INTELLIGENCE

University

20 Qs

Unit-1 Introduction to Cloud Computing

Unit-1 Introduction to Cloud Computing

University

20 Qs

JAVA - Day1

JAVA - Day1

Assessment

Quiz

Information Technology (IT)

University

Practice Problem

Medium

Created by

Chitra Muthu

Used 1+ times

FREE Resource

AI

Enhance your content in a minute

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

23 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 2 pts

What is the main purpose of the main() method in Java?

It is the entry point of the Java program.

It is used to define class properties.

It is only required for GUI-based applications.

It is used to define multiple threads.

2.

MULTIPLE CHOICE QUESTION

30 sec • 2 pts

Which of the following is true about Java?

Java is a compiled language only.

Java is a scripting language.

Java is both compiled and interpreted.

Java does not require a JVM to run.

3.

MULTIPLE CHOICE QUESTION

30 sec • 2 pts

What is the default value of an uninitialized int variable in Java?

0

null

Garbage value

1

4.

MULTIPLE CHOICE QUESTION

30 sec • 2 pts

What will be the output of the following Java code?
int x = 10;

if (x > 10)

System.out.println("Greater");

else

System.out.println("Not Greater");

Greater

Not Greater

Compilation Error

Runtime Error

5.

MULTIPLE CHOICE QUESTION

30 sec • 2 pts

How many times will the following loop execute?
int i = 0;

while (i < 3) {

System.out.println(i);

i++;

}

0

3

Infinite

4

6.

MULTIPLE CHOICE QUESTION

30 sec • 2 pts

What does the javac command do?

Executes Java programs

Compiles Java source files

Runs Java bytecode

Starts the JVM

7.

MULTIPLE CHOICE QUESTION

30 sec • 2 pts

Which component is responsible for executing Java bytecode?

JDK

JRE

JVM

Compiler

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?