Operator and Expression In Java Quiz

 Operator and Expression in Java Quiz

Java Operator and Expression Quiz :

Expression : Expression is the statement which takes the values and perform operation

int x = 3;

int y = x;

int z = x * y ;

Operators : Operators which is used to perform the variables and Values using + Operators

int x = 100 + 200;

8
Created on By 52fd849a905aedf0249df9e69d61b55a?s=32&d=mm&r=gwefru

Operator and Expression

TEST YOUR  SKILLS

1 / 10

Which of the following can be operands of arithmetic operators?

2 / 10

What will be the output of following code?

class FloatPoint

{

public static void main(String args[])

{

float a= 20.5F, b= 6.4F;

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

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

System.out.printLn("a+b"=+(a+b));

}

}

3 / 10

What will be the output of following code?

class RelationalOperators

{

public static void main (String[] args)

{

float a=15.0F, b=20.75F;

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

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

System.out.printLn( "a < b is "+ (a < b ));

}

}

4 / 10

Decrement operator '-' decreases the value of variable by what number?

5 / 10

The following escape sequence character which is not in java .

6 / 10

An arithmetic operator in java involves which operation?

7 / 10

What will be the output of the Java code?

int a=5, b=10, c=15;

a -= 3;

b *= 2;

c /= 5;

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

 

8 / 10

What will be the output of following code?

class IncrementOperator

{

public static void main(String args[])

{

int m = 10, n = 20;

System.out.printLn(" m = " + m );

System.out.printLn(" n = " + n );

System.out.printLn(" ++m = " +  ++m );

9 / 10

What happens to the Second operand/expression if the first operand is FALSE with a Short Circuit AND (&&) operator?

10 / 10

What is the output of an Exclusive OR (^) operation if one of the operands/expressions is TRUE?

Your score is

The average score is 65%

0%

Java Operators is Classified

 Operator and Expression in Java Quiz

  1. Arithmetic Operators
  2. Relational Operators
  3. Logical Operators
  4. Bitwise Operators
  5. Assignment Operators
  6. Unary Operator

Leave a Reply

Your email address will not be published. Required fields are marked *