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.
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
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.
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