Test 2

Test 2

University

50 Qs

quiz-placeholder

Similar activities

Quiz JavaScript

Quiz JavaScript

University

51 Qs

ITC 112 - Topic 2 Quiz

ITC 112 - Topic 2 Quiz

University

50 Qs

Quiz

Quiz

University

50 Qs

D & A Quiz

D & A Quiz

University

50 Qs

Java Unit 1 MCQ Test

Java Unit 1 MCQ Test

University

50 Qs

JavaScript-ITELECTIVE

JavaScript-ITELECTIVE

University

50 Qs

Orientation  Quiz

Orientation Quiz

University - Professional Development

50 Qs

PHP Quiz (CO1, CO2)

PHP Quiz (CO1, CO2)

University

50 Qs

Test 2

Test 2

Assessment

Quiz

Computers

University

Hard

Created by

Prof. Wadhwani

Used 2+ times

FREE Resource

50 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

20 sec • 1 pt

Which of the following is the correct way to declare an array in Java?
int arr[] = new int[5];
int arr = new int[5];
array arr[5];
int arr() = new int[5];

2.

MULTIPLE CHOICE QUESTION

20 sec • 1 pt

What will be the output of: System.out.println(10 + 20 + "Java");
30Java
Java30
1020Java
Java1020

3.

MULTIPLE CHOICE QUESTION

20 sec • 1 pt

Which keyword is used to inherit a class in Java?
implements
extends
inherit
super

4.

MULTIPLE CHOICE QUESTION

20 sec • 1 pt

Which operator is used to compare two values in Java?
equals
double equal
!=
slash

5.

MULTIPLE CHOICE QUESTION

20 sec • 1 pt

How to find the length of a string in Java?
str.length
str.len()
str.length()
length(str)

6.

MULTIPLE CHOICE QUESTION

20 sec • 1 pt

What is the default value of an int variable in Java?
0
null
undefined
1

7.

MULTIPLE CHOICE QUESTION

20 sec • 1 pt

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

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?