Java Forums

Main Menu
Home
Today's Posts
FAQ
Search
Contact Us

Java Network
Linux Archive
Java Tips
Java Tips Blog

Sponsored Links





Welcome to the Java Forums.

You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community, you will:

  • have access to post topics
  • communicate privately with other members (PM)
  • not see advertisements between posts
  • have the possibility to earn one of our surprises if you are an active member
  • access many other special features that will be introduced later.

Registration is fast, simple and absolutely free so please, join our community today!

If you have any problems with the registration process or your account login, please contact us.

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 12-10-2007, 12:59 AM
Member
 
Join Date: Dec 2007
Posts: 1
junix is on a distinguished road
Programm Error: cannot find symbol Help?
help me with this problem guyz..i am stuck, i am new to java, where going to program an something like array application. but it breaks my heart when i see this errors:
Grade.java: cannot find this symbol
symbol: method length()
location: class double[]
for(i=0; i<grades.length(); i++)
^

//this is my code:
i declared in my class
private static double [] grades;
then as i loop it
for(i=0; i<grades.length(); i++)
^
error goes out... pls help me guyz...
God Bless
Bookmark Post in Technorati
Reply With Quote
Sponsored Links
  #2 (permalink)  
Old 12-10-2007, 02:54 AM
Member
 
Join Date: Dec 2007
Posts: 7
definewebsites is on a distinguished road
Re:
Could you please post your complete code so that we can be in a better position to see where your problem is.

Since you are getting a "cannot find symbol error", it is possible that you are using a variable that has not been declared, or you have incorrectly implemented a method, or there is a spelling mistake in your syntax.

HTH
Bookmark Post in Technorati
Reply With Quote
  #3 (permalink)  
Old 12-10-2007, 07:30 AM
Member
 
Join Date: Aug 2007
Posts: 22
revathi17 is on a distinguished road
From what you have posted, you have used length() as a method like grades.length()
but length is an attribute of the array, it is not a method
you have to call it like this: grades.length

Code:
for (int i=0; i<grades.length; i++) { }
Hope this helps..

-R
Bookmark Post in Technorati
Reply With Quote
Sponsored Links
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] Java Error: Cannot find Symbol... bobleny New To Java 8 04-15-2008 08:35 AM
cannot find symbol class error po0oker New To Java 5 10-31-2007 04:52 PM
Error: cannot find symbol silvia New To Java 1 08-07-2007 07:39 AM
Error: cannot find symbol cachi AWT / Swing 1 08-06-2007 10:12 PM
Error: cannot find symbol constructor zoe New To Java 1 07-24-2007 10:24 PM


All times are GMT +3. The time now is 03:56 AM.


VBulletin, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright ©2006 - 2007, www.java-forums.org