What will be the output of the following Java program?
class selection_statements
{
public static void main(String args[])
{
int var1 = 5;
int var2 = 6;
if ((var2 = 1) == var1)
System.out.print(var2);
else
System.out.print(++var2);
}
}
1
2
3
4
Quiz Recommendation System API Link - https://fresherbell-quiz-api.herokuapp.com/fresherbell_quiz_api
# | Quiz |
---|---|
1
Discuss
|
What would be the output of the following code snippet if variable a=10?
Solution |
2
Discuss
|
Which of these are selection statements in Java?
Solution |
3
Discuss
|
What will be the output of the following Java program?
Solution |
# | Quiz |
Copyright © 2020 Inovatik - All rights reserved