• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

I want to print a text message after a numeric value

 
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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: 79180
377
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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: 39
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic