• Post Reply Bookmark Topic Watch Topic
  • New Topic

cannot find symbol  RSS feed

 
Ranch Hand
Posts: 61
Chrome Eclipse IDE Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
i tried to run the first javca program and i get error msg:C:\test>javac sample1.java
sample1.java:2: error: cannot find symbol
        public static void main(string args[]){
                                ^
  symbol:   class string
  location: class apples
1 error. and this is ny code: class apples{
public static void main(string args[]){
  System.out.println("hello world!");
}
}. please a reply will be appreciated

 
Saloon Keeper
Posts: 3330
46
Eclipse IDE Firefox Browser Java MySQL Database VI Editor Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It's "String", not "string".
 
author
Sheriff
Posts: 23295
125
C++ Chrome Eclipse IDE Firefox Browser Java jQuery Linux VI Editor Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Java is case sensitive. So, a String class and a string class are two different classes. Make sure you get your cases correct.

Henry
 
Bartender
Posts: 726
23
Eclipse IDE Hibernate jQuery MySQL Database Spring Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
And Welcome to CodeRanch!
 
adebari olalekan
Ranch Hand
Posts: 61
Chrome Eclipse IDE Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
thanks guys that was handy
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!