Search Header Logo

Java Basic Day-2

Authored by G.L. Bajaj Greater Noida

Computers

University

Used 25+ times

Java Basic Day-2
AI

AI Actions

Add similar questions

Adjust reading levels

Convert to real-world scenario

Translate activity

More...

    Content View

    Student View

10 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

which of the following is a legal identifier in java?

2variable

#myvar

+@$var

$_myvar

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

which of these is NOT a valid keyword or reserved word in java?

default

null

String

volatile

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

which is the legal range of values fro a short?

-128 to +127

-255 to 255

-32768 to 32767

0 to 65535

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

which declaration of the main() method is valid?

public void main(String args[])

public void static main(String args[])

final public static void main(String []arr)

public static void main(String []arr)

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Is 3*4 equivalent to 3 << 2 ?

Yes

NO

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

what will be the output?

public class Test

{

public static void main(String[] args) {

double d=100.04;

float f=d;

System.out.println(""+f);

}

}

100.04

100.0

100

Compilation Error

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which Operator will always evaluate all the operands ?

||

&&

?:

%

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?

Discover more resources for Computers