Java Programming Quiz

Java Programming Quiz

University

10 Qs

quiz-placeholder

Similar activities

Java Bootcamp Day 4

Java Bootcamp Day 4

University

15 Qs

Milking Minds 2 17-01-24

Milking Minds 2 17-01-24

University

15 Qs

C# Cơ bản

C# Cơ bản

University

15 Qs

JAVA array

JAVA array

12th Grade - University

10 Qs

MindSpace Computers Quiz

MindSpace Computers Quiz

University

10 Qs

DEBUG THE CODE

DEBUG THE CODE

University

10 Qs

Java All

Java All

University

13 Qs

Java Quiz 4

Java Quiz 4

University

15 Qs

Java Programming Quiz

Java Programming Quiz

Assessment

Quiz

Computers

University

Hard

Created by

sumathi A

FREE Resource

10 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the correct syntax for the main method in Java?

public static void main(String args[])

public void main(String args[])

public static void main(String[] args)

public void main(String[] args)

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

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

int

float

String

char

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the size of an int data type in Java?

4 bytes

2 bytes

8 bytes

1 byte

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which of the following is used to create an object in Java?

class

new

import

package

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the output of the following code snippet? int x = 5; int y = 10; System.out.println(x + y);

510

15

x + y

5 + 10

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which keyword is used to inherit a class in Java?

extends

implements

inherits

super

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the purpose of the final keyword in Java?

To define a constant

To prevent method overriding

To prevent inheritance

All of the above

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?