Search Header Logo

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

Authored by Training Hyderabad

Computers

University

Used 6+ times

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

AI Actions

Add similar questions

Adjust reading levels

Convert to real-world scenario

Translate activity

More...

    Content View

    Student View

20 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which of the below is valid way to instantiate an array in java?

int myArray [] = {1, 3, 5};
int myArray [] [] = {1,2,3,4};
int [] myArray = (5, 4, 3);
int [] myArray = {“1”, “2”, “3”};

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the return type of hashCode() method in Object class

Object
int
long
void

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What will be output of below program?<br />public class Test { <br />public void main(String[] args) {<br />int x = 10*30-70; <br />System.out.println(x); <br />}<br />}

Compile-time error
Runtime Error
Prints 0
Prints 230

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the output of the below Java program with WHILE, BREAK and CONTINUE?<br />int cnt=0;<br />while(true)<br />{<br />if(cnt > 4)<br />break;<br />if(cnt==0)<br />{ <br />cnt++;<br />continue;<br />}<br />System.out.print(cnt + ",");<br />cnt++;<br />}

0,1,2,3,4,
Compiler Error
1,2,3,4,
0,1,2,3

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

x=3,y=5,z=10.What is the value of<br />++z +y-y+z+x++

24
23
25
20

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Early binding is also class as?

late binding
static binding
dynamic binding
fast binding

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Use of final keyword in java?

when a method is final, it can be overridden
when a class is made final, a subclass of it cannot be created
when a method is final, it can not be overridden
none of the above

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

Classlink

Continue with Classlink

Clever

Continue with Clever

or continue with

Microsoft

Microsoft

Apple

Apple

Others

Others

Already have an account?