Re: when to use "new"

From: Gernot Frisch (Me_at_Privacy.net)
Date: 11/15/04


Date: Mon, 15 Nov 2004 10:14:15 +0100


<snip>
> Now we get a problem. You can write the following Java codes:
> Polynomial createNew() {
> return new Polynomial();
> }
<snap>

Why does one want to do this:

Polynomial* p1 = OtherPoly.createNew();

instead of:
Polynomial p1 = OtherPoly;
??
I've never programmed much Java so I don't get the idea here. I think
you don't have to new/delete at all if you're from java world. If you
use container classes you have all the java functionality without
caring about new/delete. Correct me if I'm wrong.

-Gernot



Relevant Pages

  • Re: Java
    ... Falls Du (oder wer auch immer GC-Java UND SNAP nutzt) mal ausprobieren ... Der Mauspositionierungsfehler ist auch mit der GC Java 141 Endversion ... Ciao Kai ...
    (de.comp.os.os2.apps)
  • Re: Java
    ... Falls Du (oder wer auch immer GC-Java UND SNAP nutzt) mal ausprobieren ... Der Mauspositionierungsfehler ist auch mit der GC Java 141 Endversion ...
    (de.comp.os.os2.apps)