Java Test - 1

Java Test - 1

9th - 12th Grade

40 Qs

quiz-placeholder

Similar activities

Java Assesment Unit 1, Unit2

Java Assesment Unit 1, Unit2

9th - 12th Grade

44 Qs

java

java

10th - 12th Grade

40 Qs

python set 3

python set 3

9th - 12th Grade

41 Qs

A Level Quiz

A Level Quiz

12th Grade

40 Qs

Class XI Revision I

Class XI Revision I

11th - 12th Grade

43 Qs

Javascript

Javascript

9th - 12th Grade

40 Qs

65-FinalJava

65-FinalJava

10th Grade

40 Qs

Quizes-Syntax-Master

Quizes-Syntax-Master

12th Grade

45 Qs

Java Test - 1

Java Test - 1

Assessment

Quiz

Computers

9th - 12th Grade

Hard

Created by

Vikas Bandaru

Used 5+ times

FREE Resource

40 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

Which keyword is used to create a subclass in Java?

extends

super

this

class

2.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

What is the correct syntax for declaring an array in Java?
int arrayName[];
int[] arrayName;
int arrayName;
Both A and B

3.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

Which keyword is used to define a method that cannot be overridden in a subclass?

static

final

private

public

4.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

Which keyword is used to handle exceptions in Java?
try
catch
throw
All of the above

5.

MULTIPLE SELECT QUESTION

1 min • 1 pt

Which of the following is a valid method declaration in Java?

public void myMethod(int x, y)

public void myMethod(int x, int y)

public void myMethod(int x)

None of the above

6.

MULTIPLE SELECT QUESTION

1 min • 2 pts

Which of the following is a valid declaration of a static method in a Java class?
public static int myMethod()
static public int myMethod()
public int static myMethod()
All of the above

7.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

Which of the following is not a primitive data type in Java?
int
double
boolean
String

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?