- 2
Please someone should give me code in Java for these instances. If my age is 29 print good else print okay.
If or else statements
3 Answers
+ 4
public class Program {
public static void main(String[] args) {
int age = 29;
if(age == 29) {
System.out.println("good");
} else {
System.out.println("okay");
}
}
}
+ 3
boolean it's a self learning platform ,as the name of app says it all ,you shudn't provide direct codes ,ask them to show what they have attempted so far ,and it is a very basic question ,let them put their efforts into finding out how would they approach it and later help them if they get stuck somewhere
+ 2
Okay