+ 2

Why this result is error?

if(false) system.out.print('a'); else system.out.print('b');

22nd Jun 2018, 11:38 PM
Caty Zurano
Caty Zurano - avatar
3 odpowiedzi
+ 9
"System" should be capitalized. If you're on a desktop compiler like Eclipse or Netbeans, it may be giving you a warning about "unreachable code" because your if is always false, and System.out.print('a'); will never run.
22nd Jun 2018, 11:41 PM
Tamra
Tamra - avatar
+ 1
thank you!
23rd Jun 2018, 1:45 AM
Caty Zurano
Caty Zurano - avatar
0
System should be capitalized!
23rd Jun 2018, 2:16 AM
coolboy7
coolboy7 - avatar