[5244] in java-interest

home help back first fref pref prev next nref lref last post

Re: Is 'new' really necessary?

daemon@ATHENA.MIT.EDU (Jonathan Locke)
Sat Feb 3 03:35:15 1996

Date: Fri, 2 Feb 1996 23:05:17 -0800 (PST)
From: Jonathan Locke <jonl@speakeasy.org>
To: David Geary <David.Geary@Central.Sun.COM>
Cc: java-interest@java.Eng.Sun.COM, kkobashi@ix6.ix.netcom.com
In-Reply-To: <199602021636.JAA07713@trilby.Central.Sun.COM>


> Realize that (c) above creates a null REFERENCE to a Date, and does
> not create a local Date object, as it would in C++.  Also note that
> the following:
> 
>   	Date a = new Date(CurrentTime);
>   	Date c;
> 
>   	c = a;
> 
>   is equivalent to the following C++ code:
> 
> 	Date& a = *(new Date(CurrentTime));
> 	Date& c = 0;
> 
> 	c = a;

not quite... 

	delete &a;

     ;-)

Java sure is cool!

	J



-
This message was sent to the java-interest mailing list
Info: send 'help' to java-interest-request@java.sun.com

home help back first fref pref prev next nref lref last post