Path: csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!news.albasani.net!news2.arglkargh.de!news.n-ix.net!news.belwue.de!rz.uni-karlsruhe.de!feed.news.schlund.de!schlund.de!news.online.de!not-for-mail From: Lothar Kimmeringer Newsgroups: comp.lang.java.help Subject: Re: Instantiate an abstract class Date: Wed, 6 Apr 2011 18:26:40 +0200 Organization: Organization?! Only chaos here! Lines: 24 Message-ID: References: <61c7300d-6011-4639-a5f1-5cd4c58906fa@r4g2000prm.googlegroups.com> Reply-To: news@kimmeringer.de NNTP-Posting-Host: mnch-4d044b5f.pool.mediaways.net Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Trace: online.de 1302107200 17735 77.4.75.95 (6 Apr 2011 16:26:40 GMT) X-Complaints-To: abuse@einsundeins.com NNTP-Posting-Date: Wed, 6 Apr 2011 16:26:40 +0000 (UTC) User-Agent: 40tude_Dialog/2.0.15.1de Xref: x330-a1.tempe.blueboxinc.net comp.lang.java.help:554 Rob McDonald wrote: > When I try it, I get a variety of errors depending on different > attempts... > > AFoo a = new this.getClass(); > Syntax error on token "this", invalid Name > > AFoo a = new (this.getClass()); > AFoo a = new (this).getClass(); > Syntax error on token "new", ClassType expected after this token > > Suggestions appreciated, getClass().newInstance(); Regards, Lothar -- Lothar Kimmeringer E-Mail: spamfang@kimmeringer.de PGP-encrypted mails preferred (Key-ID: 0x8BC3CD81) Always remember: The answer is forty-two, there can only be wrong questions!