JAVA FUNDAMENTALS ASSESSMENT 1

JAVA FUNDAMENTALS ASSESSMENT 1

University

40 Qs

quiz-placeholder

Similar activities

Java Control Structures

Java Control Structures

11th Grade - Professional Development

39 Qs

Java Control Flow and Collections

Java Control Flow and Collections

11th Grade - Professional Development

39 Qs

Data Structure PrelimExam

Data Structure PrelimExam

University

35 Qs

Test 2

Test 2

University

36 Qs

Quiz Penilaian AP2A

Quiz Penilaian AP2A

University

40 Qs

Java Quiz

Java Quiz

University

40 Qs

Java Assignment Quiz

Java Assignment Quiz

University

41 Qs

ย้อนหลัง กลางภาค Java ระดับต้น

ย้อนหลัง กลางภาค Java ระดับต้น

KG - University

40 Qs

JAVA FUNDAMENTALS ASSESSMENT 1

JAVA FUNDAMENTALS ASSESSMENT 1

Assessment

Quiz

Computers

University

Medium

Created by

Gaurav Nayak

Used 12+ times

FREE Resource

40 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

What will be the output of the following Java program?

class Output {

public static void main(String args[]) {

int a = 1;

int b = 2;

int c;

int d;

c = ++b;

d = a++;

c++;

b++;

++a;

System.out.println(a + " " + b + " " + c); }

}

324

323

244

234

344

2.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

What will be the output of the following Java code?

class operators {

public static void main(String args[]) {

int x = 8;

System.out.println(++x * 3 + " " + x); }

24 8

27 9

24 9

27 8

3.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

What will be the output of the following Java code?

class Relational_operator {

public static void main(String args[]) {

int var1 = 5;

int var2 = 6;

System.out.print(var1 > var2); }

}

5

6

FALSE

TRUE

4.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

What will be the output of the following Java program?

class booloperators {

public static void main(String args[]) {

boolean var1 = true;

boolean var2 = false;

System.out.println((var1 & var2));

}

}

True

False

1

0

5.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

What will be the output of the following Java program?

public static void main(String args[]) {

char a = 65;

char b = 66;

char d = 68;

d--;

char c = --b;

a++;

System.out.println(b);

System.out.println(d);

System.out.println(b);

System.out.println(a);

}

}

A

C

A

B

B

A

B

A

B

A

C

A

A

D

A

B

6.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

What will be the output of the following Java program?

class squareroot {

public static void main(String args[]) {

double a, b;

a = 3.0;

b = 4.0;

double c = Math.sqrt(a * a + b * b);

System.out.println(c); } }

compilation error

25

7

5

7.

MULTIPLE SELECT QUESTION

1 min • 1 pt

Java is used for :

Web applications

Database connection

Games

Desktop applications

Text Editing

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?