Laurel
0
Q:

else statement java

System.out.println("How many sattelites does JUPITER have ??");
		C = scan.nextInt();
		
		if (C == 79)
		{
			System.out.println("Congrats ! You got the Third  Question Right :)");
			points = points + 1;
		}
		
		else if (C != 79)
		{
			System.out.println("Sorry but your answer is wrong :(");
		}
3
int x = 3;

if (x == 3) {
  // block of code to be executed if the condition is true
} else {
  // block of code to be executed if the condition is false
}
10
int a=10;
if(a>5){
// block of code to be executed if the condition in true
}
else{
// block of code to be excuted if the condition in false
}
4
int x = 3;

if (x == 3) {
  // block of code to be executed if the condition is true
}
8

New to Communities?

Join the community