Your format string doesn't match the list of arguments that you want to pass to it.
Joined: Jan 16, 2005
Thanks, I tried this :
But still gettin this error:
please tell me friends,how to get rid of this. Thanks
Joined: Sep 18, 2005
Originally posted by jas oberai: I tried this : System.out.printf( "%s %s %s %d %d %d %f \n",....) for String,String,String,int,int,int,double
If you actually had passed those arguments to that format string, jas, it would have worked, so I don't think you did. My guess is that the 4th arg you passed was a string, which is what caused the error message "d != java.lang.String", meaning that a "d" format specifier can't deal with a string. So I repeat:
Your format string doesn't match the list of arguments that you are passing to it.
If you still can't get it to work, show us the complete printf statement, so we can see what args you are actually passing, not just what args you think you are passing. [ October 10, 2005: Message edited by: Kym Thompson ]
This is not correct Java syntax and will not even compile. I assume that you put "...." instead of what you REALLY have here. We need to see ALL the arguments that you have left out in order to help you. The format String is just fine, IF THE OTHER ARGUMENTS MATCH. We can't help you understand why they don't match unless you show us what the other arguments ARE.