• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Having troubles with a complex program, need help with an illegal start of type error.

 
Nick Harms
Ranch Hand
Posts: 44
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Well my homework isnt due today, and I have been acing this class and going ahead farther than anyone, for some reason i suck at this program! GRRRR lol
 
Janeice DelVecchio
Saloon Keeper
Posts: 1809
12
Eclipse IDE Java Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Well your original issue is resolved. If you have a new question, I suggest to start a new thread. That way, people won't get frustrated with the :



Don't post long lines in your code tags... it causes weird horizontal scrolling. Just break that really long one up into 2 lines.

Seriously. Get HFJ. Using methods is just the beginning of OO programming and you need to understand the rules a little better.

Oracle/Sun has good tutorials too, uhmmmm...... here:
http://java.sun.com/docs/books/tutorial/

I am going to bed now.... I had a long day
Good luck!
and welcome to JavaRanch!
 
Nick Harms
Ranch Hand
Posts: 44
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
So you would have a int variable up in your main method and set it like this
int 1, 2, 3, 4, 5?
or
int 1
int 2
int 3
int 4
int 5
is that what you mean so only those certain things are allowed?
If so can you remind me how to write so the user can input an int?
 
Janeice DelVecchio
Saloon Keeper
Posts: 1809
12
Eclipse IDE Java Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator


Check out the API
http://java.sun.com/javase/6/docs/api/java/util/Scanner.html
 
Jim Hoglund
Ranch Hand
Posts: 525
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank you Janeice.

Jim ... ...
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic