X-Received: by 10.58.218.40 with SMTP id pd8mr255172vec.39.1392110859608; Tue, 11 Feb 2014 01:27:39 -0800 (PST) X-Received: by 10.50.43.137 with SMTP id w9mr323962igl.14.1392110859249; Tue, 11 Feb 2014 01:27:39 -0800 (PST) Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!usenet.blueworldhosting.com!feeder01.blueworldhosting.com!peer01.iad.highwinds-media.com!news.highwinds-media.com!feed-me.highwinds-media.com!k15no16990661qaq.0!news-out.google.com!vg8ni28igb.0!nntp.google.com!c10no17100737igq.0!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail Newsgroups: comp.lang.java.programmer Date: Tue, 11 Feb 2014 01:27:38 -0800 (PST) In-Reply-To: Complaints-To: groups-abuse@google.com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=14.141.91.20; posting-account=eLbnfAoAAAD_IYDiRD2zMjaeA0fYnz67 NNTP-Posting-Host: 14.141.91.20 References: <705891c8-b170-44c0-866f-48eec7b38c4d@googlegroups.com> User-Agent: G2/1.0 MIME-Version: 1.0 Message-ID: <6b78f736-cf64-4a0b-8f83-82beb1aba0d2@googlegroups.com> Subject: Re: Unable to Overload toString for Object From: Ojesh Dugar Injection-Date: Tue, 11 Feb 2014 09:27:39 +0000 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Received-Bytes: 2442 X-Received-Body-CRC: 2556233920 Xref: csiph.com comp.lang.java.programmer:27486 On Tuesday, February 11, 2014 2:47:27 PM UTC+5:30, Stefan Ram wrote: > Ojesh Dugar writes: >=20 > >But my problem still remains how do i ACCESS the content of =BBcreateRes= ult=AB which is not instance of my class??=20 >=20 >=20 >=20 > In Java and OOP, one prefers to hide the content. This is >=20 > called =BBinformation hiding=AB or =BBencapsulation=AB. Objects > Thanks a lot. I'll work on it. > instead have =BBbehavior=AB. >=20 >=20 >=20 > What comes most close to =BBaccess the content of an object=AB, >=20 > would be to read the documentation of the class of the object. >=20 >=20 >=20 > When =BBo=AB is an object, you can get its class with =BBo.getClass()= =AB. >=20 > When the class is being defined in a library or program, someone >=20 > should have written a documentation for it, and you should read >=20 > that documentation to learn how to get information from the object >=20 > (using your point of view, although we prefer not to think of >=20 > objects as information containers but rather of entities with behavior)= .