+ 9

if...else statement (error help)

public class Program { public static void main(String[] args) { int age = 30; if (age < 16) { System.out.println("Too young"); } else { System.out.printIn("Welcome!"); } } } //why isnt it working? where is the mistake??

30th Jan 2018, 1:09 PM
Pascal Hüser
11 Antworten
+ 16
Line 8 : you wrote printIn rather than println (i -> l) public class Program { public static void main(String[] args) { int age = 30; if (age < 16) { System.out.println("Too young"); } else { System.out.println("Welcome!"); } } }
30th Jan 2018, 1:15 PM
Valen.H. ~
Valen.H. ~ - avatar
+ 3
ohhh.. i should use a small "L" rather than a big "i"?
30th Jan 2018, 1:23 PM
Pascal Hüser
+ 2
biting my ass right now... i searched for so long.. 😂
30th Jan 2018, 1:32 PM
Pascal Hüser
+ 2
u wrote system.out.printIn("welcome!"); but u need to correct dat at place of "printIn" u wrote "Captical letter i" ....there u should place "Small letter L" ....that's it
31st Jan 2018, 3:48 AM
Tarun Ella
Tarun Ella - avatar
+ 2
I do this at least once a day, if not this then I forget a semicolon;
31st Jan 2018, 1:08 PM
Jeff Faul
Jeff Faul - avatar
+ 2
If you need an IDE for Android, I would recommend AIDE or Dcoder.
5th Feb 2018, 12:16 AM
dim_knp
dim_knp - avatar
+ 1
i thought for so long "System.out.printin"(for taking the text "in" the string) but noooooo its called "Line" rip.
30th Jan 2018, 3:09 PM
Pascal Hüser
+ 1
@Adam Ross IDE for Androit??
31st Jan 2018, 6:40 AM
Pascal Hüser
+ 1
IDE for android huh?
2nd Feb 2018, 9:59 AM
Christopher Butler (JesusCoins)
Christopher Butler (JesusCoins) - avatar
0
i dont know too ^^
2nd Feb 2018, 10:50 AM
Pascal Hüser
0
hmm.. kk^^
5th Feb 2018, 6:17 AM
Pascal Hüser