What will be the output of the following Java program?
class jump_statments
{
public static void main(String args[])
{
int x = 2;
int y = 0;
for ( ; y < 10; ++y)
{
if (y % x == 0)
continue;
else if (y == 8)
break;
else
System.out.print(y + " ");
}
}
}
1 3 5 7
2 4 6 8
1 3 5 7 9
1 2 3 4 5 6 7 8 9
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 are selection statements in Java?
Solution |
3
Discuss
|
What would be the output of the following code snippet if variable a=10?
Solution |
# | Quiz |
Copyright © 2020 Inovatik - All rights reserved