• Post Reply Bookmark Topic Watch Topic
  • New Topic

cannot find symbol  RSS feed

 
adebari olalekan
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´╗┐

 
Carey Brown
Bartender
Posts: 3000
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".
 
Henry Wong
author
Sheriff
Posts: 23283
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
 
Ganesh Patekar
Bartender
Posts: 696
23
Eclipse IDE Hibernate Java jQuery MySQL Database Netbeans IDE Oracle 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
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!