• Post Reply Bookmark Topic Watch Topic
  • New Topic

i dont know why i cant give string input  RSS feed

 
simon asir
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

the code exits after i giving input.let me know whats the issue...Thank you..
 
Winston Gutkowski
Bartender
Posts: 10575
66
Eclipse IDE Hibernate Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
simon asir wrote:the code exits after i giving input.let me know whats the issue...Thank you..

Hi simon, and welcome to JavaRanch.

1. When posting code, please UseCodeTags. I've added them this time; see how much better it looks?

2. I'm surprised you don't know that you should AvoidTheEqualityOperator.
That's the basic problem you're running into.

3. Another page you might want to read is StringsAreBad.
Specifically, in the context of your program, 'n' is NOT a String.

HIH

Winston
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!