Home » Newcomers » Newcomers » resolved: Is there something new with printf()/(The method printf(String, Object[]) in the type PrintStream is not applicable for the arguments (String, Object))
resolved: Is there something new with printf()/ [message #926753] |
Fri, 28 September 2012 23:59 |
Gregory Hansen Messages: 2 Registered: September 2012 |
Junior Member |
|
|
I took several Java programming classes six and seven years ago. When I got a job six+ years ago, they didn't use Java. So, now I am trying to refresh my knowledge of Java using the textbook from seven years ago.
One of the example programs has the following command:
System.out.printf( "%-8s\t", metaData.getColumnName( i ) );
Now, when I enter this program, I get the following message:
"The method printf(String, Object[]) in the type PrintStream is not applicable for the arguments (String, Object)"
Even a simple command like "System.out.printf( "%s", "cow" );" returns the above error.
Please help me determine what I'm missing.
Thanks,
Gregory
[Updated on: Mon, 01 October 2012 04:11] Report message to a moderator
|
|
|
Re: Is there something new with printf()/ [message #928482 is a reply to message #926753] |
Sun, 30 September 2012 17:22 |
|
On 09/28/2012 05:59 PM, Gregory Hansen wrote:
> I took several Java programming classes six and seven years ago. When I
> got a job six+ years ago, they didn't use Java. So, now I am trying to
> refresh my knowledge of Java using the textbook from seven years ago.
>
> One of the example programs has the following command:
>
> System.out.printf( "%-8s\t", metaData.getColumnName( i ) );
>
> Now, when I enter this program, I get the following message:
>
> "The method printf(String, Object[]) in the type PrintStream is not
> applicable for the arguments (String, Object)"
>
> Even a simple command like "System.out.printf( "%s", "cow" );" returns
> the above error.
>
> Please help me determine what I'm missing.
>
> Thanks,
> Gregory
This forum is really for answering questions about Eclipse, the Eclipse
workbench, etc. and not for answering general Java questions. You'll
find better and more dedicated help for this at javaranch.com,
stackoverflow.com, etc.
|
|
| |
Goto Forum:
Current Time: Wed Sep 25 06:51:29 GMT 2024
Powered by FUDForum. Page generated in 0.08036 seconds
|