- 1
Hi,can someone please help me what's wrong with this java code ? I keep getting an error.
I'm trying to learn from java : The complete reference and i tried this code.But it is giving me error. Public class Main { public static void main(String args[]) { int x, y; Y = 20; for(x = 0; x<10; x++) { system.out.println("This is x:" + x); system.out.println("This is y:" + y); y = y - 2; } } }
3 Answers
+ 1
Public 'p' should be lowercase
System 'S' should be uppercase
+ 14
hello!!... actually u have to look into the syntax...caps and small
b/w error was just these
>u declared y* and initialised using Y*
>System class 1st letter is capital
>access specifier public it's small...u did it Public
https://code.sololearn.com/cr1pAeDS8YIF/?ref=app
+ 2
Hello, thank you for helping me out guys.