-
Notifications
You must be signed in to change notification settings - Fork 5.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
why this error come from cmd #71
Comments
Hello! |
Wrong Syntax and Capitalize The String Correct Code. public static void main(String[] args) |
Code : public static void main(String[] args) Also calitalize the word String |
Correct Code: public class helloWorld{ Java is case-sensitive ,so its important to pay attention to the casing of your variables, class names, and important statements. so here in your code capitalize the String-S and also the System-S. |
The errors in your Java program are due to some syntax and case sensitivity issues. Here's the corrected code: The class name should start with an uppercase letter. In this case, it should be "HelloWorld" instead of "helloWorld." The main method should have a capital 'S' in "String" and proper capitalization. The System class should also have a capital 'S,' and the println method should be called using System.out.println(). After making these changes, you should be able to compile and run your program without any errors.** |
sublime
public class helloWorld{
}
cmd ,
C:\Users\user\Desktop\linkedin\java\java>javac helloWorld.java
helloWorld.java:3: error: cannot find symbol
public static void main(string[] args){
^
symbol: class string
location: class helloWorld
helloWorld.java:4: error: package system does not exist
system.out.println("hello world! It's me malitha!");
^
2 errors
The text was updated successfully, but these errors were encountered: