DummyMan said:
I was wondering could someone tell me the code to display a simple
prompt for a number in java with the system.println commands. So that
I could prompt the user for a number, take the number and multiply it
by 4, and return the output on the screen. Thanks.
Most here could give you code for your task, and one or two might even
do so. On the other hand, you'll get more out of it if you consult your
text and / or ask your instructor, then work it out for yourself. I'll
give you a few hints, though:
() Every Java program is constituted by one or more classes, so you'll
need to write a class.
() A class that serves as the main class of an application must have a
method with this signature:
public static void main(String[] args)
() The static method described above is what the JVM will run when you
feed it your class; for a task as simple as you describe, you can
probably put all your task-specific code there.
If you couldn't have gotten at least those things out of your text /
instructor, then you need a better text / instructor.
John Bollinger
(e-mail address removed)