What will be the output of the following Java code?
class operators
{
public static void main(String args[])
{
int var1 = 5;
int var2 = 6;
int var3;
var3 = ++ var2 * var1 / var2 + var2;
System.out.print(var3);
}
}
10
11
12
56
Quiz Recommendation System API Link - https://fresherbell-quiz-api.herokuapp.com/fresherbell_quiz_api
# | Quiz |
---|---|
1
Discuss
|
What will be the output of the following Java code?
Solution |
2
Discuss
|
What will be the output of the following Java program?
Solution |
3
Discuss
|
What will be the output of the following Java program?
Solution |
4
Discuss
|
Which of these operators can skip evaluating right hand operand?
Solution |
5
Discuss
|
Which of these is returned by “greater than”, “less than” and “equal to” operators?
Solution |
6
Discuss
|
What will be the output of the following Java program?
Solution |
7
Discuss
|
On applying Left shift operator, <<, on integer bits are lost one they are shifted past which position bit?
Solution |
8
Discuss
|
What will be the output of the following Java program?
Solution |
9
Discuss
|
What is the order of precedence (highest to lowest) of following operators? 1. & 2. ^ 3. ?:
Solution |
10
Discuss
|
What will be the output of the following Java program?
Solution |
# | Quiz |
Copyright © 2020 Inovatik - All rights reserved