0

Trying to use the conditional statements but keep getting "No Output"

Class MyClass { public static void main(String [] args) int x = 7; If (x<12) { System.out.printIn("Boss"); }}

19th Oct 2017, 2:28 PM
Jamrock
Jamrock  - avatar
2 ответов
+ 2
Java is case sensitive, replace the following Class -> class If -> if also you forgot to add curly braces for main function and you used capital "i" in println it should be small "L" i.e. "l"
19th Oct 2017, 2:42 PM
Ankit Agrawal
Ankit Agrawal - avatar
+ 1
class MyClass { public static void main(String [] args) { int x = 7; if(x<12) { System.out.print("Boss"); } } }
19th Oct 2017, 2:43 PM
Ankit Agrawal
Ankit Agrawal - avatar