Search Header Logo

day1_java basics

Authored by Corporate Support

Professional Development

Used 3+ times

day1_java basics
AI

AI Actions

Add similar questions

Adjust reading levels

Convert to real-world scenario

Translate activity

More...

    Content View

    Student View

10 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the default value of a boolean variable in Java?

true

false

0

null

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which of the following is not a Java keyword?

static

Boolean

void

private

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the size of an int in Java?

8

16

32

64

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which method is the entry point of a Java program?

start()

run()

main()

init()

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which of these data types is used to store a single character?

string


text

character

char

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What will be the output of this code?
int x = 5;

System.out.println(x++);

6


5


Compilation Error


Runtime Error

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which of the following statements about the do-while loop in Java is true?

A) The condition is checked before the loop body executes.


B) The loop may never execute if the condition is false.


C) The loop body executes at least once, even if the condition is false.


D) The do-while loop cannot use a boolean condition.

Access all questions and much more by creating a free account

Create resources

Host any resource

Get auto-graded reports

Google

Continue with Google

Email

Continue with Email

Microsoft

Continue with Microsoft

or continue with

Facebook

Facebook

Apple

Apple

Others

Others

Already have an account?

Discover more resources for Professional Development