• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

storing an array in a meathod problem...

 
Jim Nobert
Greenhorn
Posts: 4
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello everyone,
I'm having a little difficulty trying to get a String to store a value to a StringBuffer. I'm thinking that I need to transfer the StringBuffer named major to major.toString however I need to assign it to a specific element named index.
The error I am recieving is "Not an Expression Statement at Line 82."

Well anyway. Maybe someone could help me with the probable brain fart I am having. Any help would be greatly apperciated.
Thanks
Jim
 
William Barnes
Ranch Hand
Posts: 986
Eclipse IDE Firefox Browser Tomcat Server
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

This is not an assignment.
[ April 01, 2003: Message edited by: William Barnes ]
 
William Barnes
Ranch Hand
Posts: 986
Eclipse IDE Firefox Browser Tomcat Server
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
And! You don't want to say "major[ index ]", as major isn't an array.
 
Jim Nobert
Greenhorn
Posts: 4
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yes major is an array... its in line 6.
 
Jim Nobert
Greenhorn
Posts: 4
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
William,
I realize it is not a statement... but however, this is the logic that I was thinking in order to perform the task, that is my whole problem
 
Layne Lund
Ranch Hand
Posts: 3061
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I don't know which line is Line 82. Can you please point it out so that we can help you pin point the error. If the line is the one indicated by William, then maybe you need to describe exactly what you meant by that line of code. That should help you determine how to change it.
[ April 01, 2003: Message edited by: Layne Lund ]
 
jon ladd
Ranch Hand
Posts: 53
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
As you see at the top of the code major is declared as a StringBuffer array and in using the logic he has already in line 82 which is array[index] == major; which says not an expression statement we are both really baffled by this. Any point on correct logic would be great.
 
John Smith
Ranch Hand
Posts: 2937
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

What you probably meant was either

OR

Your "array[index] == major[index]" is just a logical expression that is hanging loose there.
Eugene.
[ April 01, 2003: Message edited by: Eugene Kononov ]
 
Jim Nobert
Greenhorn
Posts: 4
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks for the help everyone... I think I got it
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic