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 program?
Solution |
2
Discuss
|
Which of these statements are incorrect?
Solution |
3
Discuss
|
Which of these is returned by “greater than”, “less than” and “equal to” operators?
Solution |
4
Discuss
|
Which of these statements is correct?
Solution |
5
Discuss
|
What is the order of precedence (highest to lowest) of following operators? 1. & 2. ^ 3. ?:
Solution |
6
Discuss
|
Which of the following can be operands of arithmetic operators?
Solution |
7
Discuss
|
Which of the following operators can operate on a boolean variable? 1. && 2. == 3. ?: 4. +=
Solution |
8
Discuss
|
Which of these statements are incorrect?
Solution |
9
Discuss
|
What will be the output of the following Java code?
Solution |
10
Discuss
|
What will be the output of the following Java code?
Solution |
# | Quiz |
Copyright © 2020 Inovatik - All rights reserved