From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 11232c,606685f2786a81e9 X-Google-Attributes: gid11232c,public X-Google-Thread: 103376,8f2146b9c1ab93cc X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2002-03-14 21:22:37 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!canoe.uoregon.edu!arclight.uoregon.edu!wn14eed!worldnet.att.net!135.173.83.72!wnfilter2!worldnet-localpost!bgtnsc04-news.ops.worldnet.att.net.POSTED!not-for-mail Message-ID: <3C918515.20808@worldnet.att.net> From: Jim Rogers User-Agent: Mozilla/5.0 (Windows; U; Win98; en-US; rv:0.9.4) Gecko/20011128 Netscape6/6.2.1 X-Accept-Language: en-us MIME-Version: 1.0 Newsgroups: comp.lang.ada,misc.misc Subject: Re: Upping the ante (was): ToString? References: Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Date: Fri, 15 Mar 2002 05:22:36 GMT NNTP-Posting-Host: 12.86.33.51 X-Complaints-To: abuse@worldnet.att.net X-Trace: bgtnsc04-news.ops.worldnet.att.net 1016169756 12.86.33.51 (Fri, 15 Mar 2002 05:22:36 GMT) NNTP-Posting-Date: Fri, 15 Mar 2002 05:22:36 GMT Organization: AT&T Worldnet Xref: archiver1.google.com comp.lang.ada:21258 misc.misc:5730 Date: 2002-03-15T05:22:36+00:00 List-Id: Kent Paul Dolan wrote: > "Nazgul" wrote in message > news:a6kv3e$faat1$1@ID-107015.news.dfncis.de... > > >>Is there something like Integer'ToString(xxx) that converts an integer to a >>string ? >> > > More important, is there something like toString(), with the implied > contract that _every_ object will support a parameterless call to it and > do something sensible to return a string representation of the object > usable for debugging, logging, or "not too fancy" data presentation? > Unfortunately, there is no such implied contract in Java. Every object (non-primitive type) will have a toString() method. It may not do anything sensible. If you define your own class and do NOT override the toString() inherited from the Object class your output will only be the class name followed by the output of the hashCode() method for your class. Jim Rogers