- 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

22nd Jun 2020, 6:51 PM
Android LogicđŸ’ŻđŸ€–
Android LogicđŸ’ŻđŸ€– - avatar
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"); } } }
22nd Jun 2020, 6:57 PM
boolean
boolean - avatar
+ 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
22nd Jun 2020, 7:34 PM
Abhay
Abhay - avatar
+ 2
Okay
22nd Jun 2020, 8:57 PM
boolean
boolean - avatar