• 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

Need Help with beginner Java programming.

 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi, I was wondering if anyone could help me out. I need to find out how to write a program that reads 3 real numbers from the keyboard and prints the in between number. If anyone can help me, reply here and I'll PM you. Thanks
 
lowercase baba
Posts: 13089
67
Chrome Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
we don't really hand out answers here. We also prefer to use the forums, so that someone else can come along later and learn from what you did. taking it off-line (i.e. via emails or private messages) defeats the purpose of a forum.

But folks will bend over backwards to help you here.

so, what do you have so far? can you do anything? can you write/compile/run a simple 'hello world' program?
 
Marshal
Posts: 79177
377
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
And welcome to JavaRanch

Please don't just write "Need Help . . . " as your thread names: read this FAQ.
 
Ranch Hand
Posts: 327
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Look at the method signature for the "main" method, you can see it has a String array. These get passed as command line arguments.
The number classes (Integer, Double etc) can all parse String values.
It is easy to do arithmetic with primitives (don't forget about the default return type!)
There is a very common way to as the System to print out a line of text onto the console.

Any good Java book will have examples or try it yourself and if it doesn't work, post your code and I am sure people will give more pointers.

J.
ps I've tried to give you some clues.
reply
    Bookmark Topic Watch Topic
  • New Topic