Java - SET -1

Java - SET -1

University

25 Qs

quiz-placeholder

Similar activities

PHP hypertext preprocessor

PHP hypertext preprocessor

University

20 Qs

Week 2 - Assessment 2 (ITNW0223)

Week 2 - Assessment 2 (ITNW0223)

University

20 Qs

js DOM

js DOM

12th Grade - Professional Development

20 Qs

Java, part I

Java, part I

11th Grade - University

20 Qs

coe java 24 june 21 7:30 to 745 pm only

coe java 24 june 21 7:30 to 745 pm only

University

20 Qs

JDVP Activity

JDVP Activity

12th Grade - University

20 Qs

Java - Revisão I

Java - Revisão I

University

20 Qs

CS 211 - Midterm Review

CS 211 - Midterm Review

University

30 Qs

Java - SET -1

Java - SET -1

Assessment

Quiz

Computers

University

Hard

java, array

Standards-aligned

Created by

R GIRIDHARAN

Used 16+ times

FREE Resource

25 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

Which of the following is correct about an array in Java?

Its size can be changed dynamically

It starts with index 1

All elements have the same data type

Array elements can have mixed data types

Tags

java

array

2.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

How does the indexing of an array start and end if there are 'n' elements?

Starts at 0, ends at n

Starts at 1, ends at n-1

Starts at 0, ends at n-1

Starts at 1, ends at n

Tags

java

array

3.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

In which of the following declarations, both arr1 and arr2 are arrays?

int[] arr1, arr2;

int arr1[], arr2;

Int []arr1, arr2;

None of the above

Tags

java

array

4.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

What will be the default values of elements in an integer array in Java?

0

null

-1

Undefined

Tags

java

5.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

For a boolean array in Java, which of the following will be the default value for its elements?

0

null

true

false

Tags

java

6.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

Which of the following methods is used to create arrays dynamically at runtime in Java?

using `malloc()`

using `new` keyword

using `define`

using `sizeof()`

Tags

java

7.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

Which of the following is correct about initializing an array in Java?

Elements can only be initialized during array declaration

All elements are automatically initialized to their default values when using the `new` keyword

Array initialization can only be done using the initialization block

None of the above

Tags

java

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?