Search Header Logo

Overloading and Arrays

Authored by RAVINDRA INDURTHI

Computers

8th Grade

Used 2+ times

Overloading and Arrays
AI

AI Actions

Add similar questions

Adjust reading levels

Convert to real-world scenario

Translate activity

More...

10 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which of these can be overloaded?

Methods

Constructors

All of the mentioned

None of the mentioned

2.

MULTIPLE CHOICE QUESTION

45 sec • 1 pt

Media Image

What will be the output of the following Java code?

int float method

float int method

compile time error

run time error

3.

MULTIPLE CHOICE QUESTION

45 sec • 1 pt

Media Image

What will be the output of the following Java code?

5

6

7

8

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What will be the output of the following Java code?

public class Main

{

String s="ABC";

Main(String s)

{

this.s = s;

}

void print()

{

System.out.println(this.s);

}

public static void main(String[] args)

{

Main a = new Main("Ravindra");

a.print();

}

}

Runtime Error

Ravindra

Compilation Error

ABC

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Media Image

What will be the output of the following Java code?

800

105

Runtime Error

Compilation Error

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

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

malloc

alloc

new

new malloc

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which of these is an incorrect array declaration?

int arr[] = new int[5]

int [] arr = new int[5]

int arr[]={1,2,3,4,5}

int arr[] = int [5] new

Access all questions and much more by creating a free account

Create resources

Host any resource

Get auto-graded reports

Google

Continue with Google

Email

Continue with Email

Microsoft

Continue with Microsoft

or continue with

Facebook

Facebook

Apple

Apple

Others

Others

By signing up, you agree to our Terms of Service & Privacy Policy

Already have an account?