Results 1 to 7 of 7
- 05-19-2009, 11:04 AM #1
[SOLVED] [newbie] PrintStream printf(String fmt, Object... args)
A book example...I'm trying to guess...
public static class PrintStream
{
public PrintStream printf(String fmt, Object... args);
}
1. Can I convert PrintStream to an object that I can display on screen (ahem...the default stream writer), say, using System.out.println.
2. What values do I need to set for 'fmt'?
:confused:Last edited by jon80; 05-19-2009 at 12:03 PM.
- 05-19-2009, 11:15 AM #2
fmt param u can give collection of characters or mixed (i.e) numeric+characters.
Ex: "Ramya","Ramya78" etc....
Go thru this Javdoc
http://java.sun.com/j2se/1.4.2/docs/...ng/String.htmlLast edited by RamyaSivakanth; 05-19-2009 at 11:18 AM.
Ramya:cool:
- 05-19-2009, 11:18 AM #3
lol, no read my question :P
- 05-19-2009, 11:23 AM #4
Could you please explain the problem clearly? Instead of passing to S.O.P u can use println of printstream directly know?
Last edited by RamyaSivakanth; 05-19-2009 at 11:35 AM.
Ramya:cool:
- 05-19-2009, 11:34 AM #5
imho it is clear
- 05-19-2009, 12:04 PM #6
I've re-thought my question as...
How do I use the function printf()?
...Although actually there are specific questions I was worried about before I get to that...
1. Can I convert PrintStream to an object that I can display on screen (ahem...the default stream writer), say, using System.out.println.
2. What values do I need to set for 'fmt'?
Hope this is somewhat clearer...Last edited by jon80; 05-19-2009 at 12:06 PM.
- 05-19-2009, 12:22 PM #7
Similar Threads
-
Why can't we write main without String args[]
By shailender in forum New To JavaReplies: 6Last Post: 06-17-2013, 09:28 AM -
String[] arg and String... args
By mahendra.athneria in forum Advanced JavaReplies: 4Last Post: 04-28-2009, 07:20 PM -
Error: LengthCharAt.java:3: ';' expected public static void main (String[] args)
By antgaudi in forum New To JavaReplies: 9Last Post: 11-22-2008, 11:03 PM -
[SOLVED] ReadLine(String fmt,Object... args) of Console class
By Pooja Deshpande in forum New To JavaReplies: 4Last Post: 04-25-2008, 05:51 AM -
(newbie) String doesn't compile?!
By jon80 in forum New To JavaReplies: 5Last Post: 04-09-2008, 08:37 AM


LinkBack URL
About LinkBacks
Reply With Quote
Bookmarks