• Post Reply Bookmark Topic Watch Topic
  • New Topic

I want to print a text message after a numeric value  RSS feed

 
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello Team

I am working on a project and i want to print some text message when i get a numeric value.

Like....if the output value is 10 then Click <Next Button> go to next page and print "This is a number which comes before 11".

for this which method will use and how can i implement it in my project.

please help me
 
Marshal
Posts: 56608
172
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
We don't simply hand out complete solutions. Please tell us what you are thinking of using and we'll comment on that.
 
Ranch Hand
Posts: 37
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm no pro, but I think that maybe you could use an if loop,

if number <=9{
System.out.println("your number is less than 10")
}
if number <=19{
System.out.println("ÿour number is less than 20")
}
and so on,

all you have to do, is create a method to accept numerical inputs from the user, and store the value in an int number variable.

You haven't described what your problem is, and I don't understand what you mean by "next page", you will probably have to use some Jframe,Jpanel, and the like also.

Maybe if you could describe your problem in detail, someone with more skill than I, could tell you which methods you will need and how to use them, or at least point you toward a tutorial page.
 
Don't get me started about those stupid light bulbs.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!