0
What's the error in this Java program?
public class MyClass { public static void main(String[] args) { int x = 42; if (x < 36) { System.out.printIn("hi"); } else { System.out.printIn("hey"); } } }
7 Answers
+ 16
You wrote System.out.print(Capital i)n instead of System.out.print(Small L)n
+ 12
@Jeff : I deleted my post. I didn't write the same code. "Capital i" and "Small L" look identical.
0
Yes... Exactly as krishna said... Good one though... Hard to say without compiling
0
Can you write the correct coding after if(x < 36)
0
right
Can u tell the output
if in your program after x=42
for(int i=0;i<=x/2;i+3)
System.out.println(x*x-3);
What will be the output ?
No other codes
Program ends there
0
Krishna
You wrote the same code as mine
0
Oh didn't get that at first
Thanks a lot @krishna