newbie java question.. printf...

S

SpreadTooThin

What should I have imported so that System.out.printf and
System.out.println would compile?
I get error messages like cannot find symbol.
 
A

Arne Vajhøj

SpreadTooThin said:
What should I have imported so that System.out.printf and
System.out.println would compile?
I get error messages like cannot find symbol.

Nothing.

System is in java.lang and that is always imported implicit
(even though explicit is allowed).

What is the error message you get?

(printf requires 1.5 or higher)

Arne
 
S

SpreadTooThin

Nothing.

System is in java.lang and that is always imported implicit
(even though explicit is allowed).

What is the error message you get?

(printf requires 1.5 or higher)

Arne

The error message I get is "Cannot find symbol."
I'm on MAC OS X... 10.5.7... As far as I know my Java is up to date.
java version "1.5.0_16"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_16-
b06-284)
Java HotSpot(TM) Client VM (build 1.5.0_16-133, mixed mode, sharing)
 
A

Arne Vajhøj

SpreadTooThin said:
The error message I get is "Cannot find symbol."
I'm on MAC OS X... 10.5.7... As far as I know my Java is up to date.
java version "1.5.0_16"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_16-
b06-284)
Java HotSpot(TM) Client VM (build 1.5.0_16-133, mixed mode, sharing)

We need the entire error message.

You get more than just "Cannot find symbol."

Arne
 
M

Mark Space

SpreadTooThin said:
What should I have imported so that System.out.printf and
System.out.println would compile?
I get error messages like cannot find symbol.


Probably, the imports for the arguments you are trying to print....
 
R

Roedy Green

What should I have imported so that System.out.printf and
System.out.println would compile?
I get error messages like cannot find symbol.

see http://mindprod.com/jgloss/printf.html
--
Roedy Green Canadian Mind Products
http://mindprod.com

"If people become accustomed to lying, they will unconsciously commit every possible wrong deed. Before they can act wickedly, they must lie, and once they begin to lie they will act wickedly without concern."
~ Gautama Buddha
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,767
Messages
2,569,572
Members
45,045
Latest member
DRCM

Latest Threads

Top