Java Operators

Java Operators

University

129 Qs

quiz-placeholder

Similar activities

Database Practice

Database Practice

University

126 Qs

Software Testing Udacity cs258 Unit 1

Software Testing Udacity cs258 Unit 1

University

131 Qs

INT219

INT219

University

127 Qs

Esay

Esay

1st Grade - Professional Development

133 Qs

Ôn Tập Microsoft Excel

Ôn Tập Microsoft Excel

University

129 Qs

Javascript Dom

Javascript Dom

University

134 Qs

TRY OUT UP GKMI 2019 - SEMOGA LULUS...!!!!

TRY OUT UP GKMI 2019 - SEMOGA LULUS...!!!!

University

125 Qs

tin hiếu dương đình 2024

tin hiếu dương đình 2024

University

131 Qs

Java Operators

Java Operators

Assessment

Quiz

Computers

University

Medium

Created by

GOKUL C [CIR]

Used 18+ times

FREE Resource

AI

Enhance your content in a minute

Add similar questions
Adjust reading levels
Convert to real-world scenario
Translate activity
More...

129 questions

Show all answers

1.

MULTIPLE SELECT QUESTION

1 min • 1 pt

Which statement(s) are equivalent to i = i + 1?

i += 1

i++

i -= 1

i--

2.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

++ increases the value of a variable by 1

assignment operator

decrement operator

increment operator

sentinel

3.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

What's the value of below?


int i=5;

System.out.println(i++);

System.out.println(i);

System.out.println(++i);

5

6

7

6

6

7

6

7

8

5

5

6

4.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

What would the new value of A be?

A=1;

a++;

1

2

3

4

5.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

Media Image

Please write correct output in following space-

10

20

No Output

Error

6.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

Find the output for the following.

public class IncDec

{

public static void main(String s[])

{

int a = 1;

int b = 2;

int c;

int d;


c = ++b;

d = a++;


c++;


System.out.println("a = " + a);

System.out.print("b = " + b);

System.out.println("c = " + c);

System.out.print("d = " + d);

}

}

a = 2 b = 3 c = 4 d = 1

a = 2 b = 3 c = 4 d = 1

Program does not compile.

a = 1 b = 2 c = 4 d = 2

7.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

What will be the output of the program?

class Test

{

public static void main(String [] args)

{

int x=20;

String sup = (x < 15) ? "small" : (x < 22)? "tiny" : "huge";

System.out.println(sup);

}

}

small

tiny

huge

Compilation fails

Create a free account and access millions of resources

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?