• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

java problem

 
Morgan mor
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi again!
Please help me. My program is working but I have problem whit
class Car: regNr=Input.readString();
after running of the program I can not put in the string value.
if I change it to int the program is working otherwise the program jump form
regNr=Input.readString(); to next input:maxLoad=Input.readInt();
why I have this problem.
please test the program.

 
Barry Higgins
Ranch Hand
Posts: 89
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What have you got Input defined as?
 
Morgan mor
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi!
The user puts in a new register number which is a String like this:ex
"SDF 231" and the program should print out this register number.
My problem is that I can not put in new register number.
when I try to put in new register number the program jumps to
next input sentence.
 
Barry Higgins
Ranch Hand
Posts: 89
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I understand that but I'm wondering what king of an InputStream you are using to read in the strings. You have an Input defined and I'm trying to gather what this refers to.
I'm guessing that your problem may lie there!
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic