digitalmars.D - Java gets Formatter class
- "Ben Hinkle" <bhinkle mathworks.com> Oct 11 2004
- =?ISO-8859-1?Q?Anders_F_Bj=F6rklund?= <afb algonet.se> Oct 11 2004
- "Walter" <newshound digitalmars.com> Oct 11 2004
- Stewart Gordon <smjg_1998 yahoo.com> Oct 12 2004
- Helmut Leitner <helmut.leitner wikiservice.at> Oct 12 2004
I hadn't realized this before, but Java 1.5 includes a printf formatter: http://java.sun.com/j2se/1.5.0/docs/api/java/util/Formatter.html Finally! :-) It's very spiffy. It includes things like argument reordering and date/time formatting. -Ben
Oct 11 2004
Ben Hinkle wrote:I hadn't realized this before, but Java 1.5 includes a printf formatter: http://java.sun.com/j2se/1.5.0/docs/api/java/util/Formatter.html Finally! :-) It's very spiffy. It includes things like argument reordering and date/time formatting.
%n is cool too. It outputs the platform's choice of line ending. --anders
Oct 11 2004
It's surprising how similar it is to std.format, although there are significant differences (for one, the formatter is not an object in std.format). "Ben Hinkle" <bhinkle mathworks.com> wrote in message news:ckes8i$253j$1 digitaldaemon.com...I hadn't realized this before, but Java 1.5 includes a printf formatter: http://java.sun.com/j2se/1.5.0/docs/api/java/util/Formatter.html Finally! :-) It's very spiffy. It includes things like argument reordering and
formatting. -Ben
Oct 11 2004
Ben Hinkle wrote:I hadn't realized this before, but Java 1.5 includes a printf formatter: http://java.sun.com/j2se/1.5.0/docs/api/java/util/Formatter.html Finally! :-) It's very spiffy. It includes things like argument reordering and date/time formatting.
I see, Java's new way of doing varargs is neat. And I'm a bit surprised (considering awkward syntactic salt I've seen in Java before) that it's decided to invent implicit conversions between primitive types and their standard wrapper classes. Stewart.
Oct 12 2004
Stewart Gordon wrote:Ben Hinkle wrote:I hadn't realized this before, but Java 1.5 includes a printf formatter: http://java.sun.com/j2se/1.5.0/docs/api/java/util/Formatter.html Finally! :-) It's very spiffy. It includes things like argument reordering and date/time formatting.
I see, Java's new way of doing varargs is neat. And I'm a bit surprised
Why are you surprised?(considering awkward syntactic salt I've seen in Java before) that it's decided to invent implicit conversions between primitive types and their standard wrapper classes.
The immediate competitor C# does it. That's motivation enough.Stewart.
-- Helmut Leitner leitner hls.via.at Graz, Austria www.hls-software.com
Oct 12 2004









=?ISO-8859-1?Q?Anders_F_Bj=F6rklund?= <afb algonet.se> 