Search Header Logo

Java Programming Quiz

Authored by InfiTechLearn Team

Other

University

Used 1+ times

Java Programming Quiz
AI

AI Actions

Add similar questions

Adjust reading levels

Convert to real-world scenario

Translate activity

More...

    Content View

    Student View

30 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which keyword is used to create a class in Java?

function

define

class

object

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the size of an int in Java?

2 bytes

4 bytes

8 bytes

Depends on the system

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which of the following is not a Java primitive data type?

int

float

string

char

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

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

true

false

0

null

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the entry point for any Java program?

main()

static void main()

public static void main(String[] args)

start()

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which of these cannot be used for a variable name in Java?

_value

$result

2data

result123

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which keyword is used to inherit a class in Java?

implement

import

extends

inherits

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

Classlink

Continue with Classlink

Clever

Continue with Clever

or continue with

Microsoft

Microsoft

Apple

Apple

Others

Others

Already have an account?