Unit_4_Object Oriented Programming with Java

Unit_4_Object Oriented Programming with Java

University

38 Qs

quiz-placeholder

Similar activities

Midterm Exam - CTCC0323

Midterm Exam - CTCC0323

University

33 Qs

Exception in Java

Exception in Java

University

41 Qs

Tema 6 Programación Básica

Tema 6 Programación Básica

University

40 Qs

Arrays and ArryList

Arrays and ArryList

University

40 Qs

JavaScript - Practice 8

JavaScript - Practice 8

University

40 Qs

Latihan 1 PBO XI RPL 2

Latihan 1 PBO XI RPL 2

10th Grade - University

40 Qs

Q2 PKS II TPB 10

Q2 PKS II TPB 10

University

41 Qs

Data Structures and Algorithms Quiz

Data Structures and Algorithms Quiz

University

40 Qs

Unit_4_Object Oriented Programming with Java

Unit_4_Object Oriented Programming with Java

Assessment

Quiz

Computers

University

Medium

Created by

Anil Chinchawade

Used 5+ times

FREE Resource

38 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

45 sec • 1 pt

Which of these operators is used to allocate memory to array variable in Java?

malloc

alloc

new

new malloc

2.

MULTIPLE CHOICE QUESTION

45 sec • 1 pt

Which of these is an incorrect array declaration?

int arr[] = new int[5];

int arr[5] = new int [];

int arr[];

arr = new int[5];

int [] arr = new int[5];

3.

MULTIPLE CHOICE QUESTION

45 sec • 1 pt

Which of these is an incorrect Statement?

It is always necessary to use new operator to initialize an array.

Array can be initialized using comma separated expressions surrounded by curly braces.

Array can be initialized when they are declared.

None of the mentioned

4.

MULTIPLE CHOICE QUESTION

45 sec • 1 pt

Which of these is necessary to specify at time of array initialization?

Row

Column

Both Row and Column

None of the mentioned

5.

MULTIPLE CHOICE QUESTION

45 sec • 1 pt

Which of these best describes an array?

A data structure that shows a hierarchical behavior

Container of objects of similar types

Arrays are immutable once initialized

Array is not a data structure

6.

MULTIPLE CHOICE QUESTION

45 sec • 1 pt

How do you instantiate an array in Java?

int arr[] = new int(3);

int arr[];

int arr[] = new int[3];

int arr() = new int(3);

7.

MULTIPLE CHOICE QUESTION

45 sec • 1 pt

Media Image

What is the output of the given piece of code?

4

5

ArrayIndexOutOfBoundsException

InavlidInputException

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?