Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Java > calling own methods from constructor

Thread Tools

calling own methods from constructor

Mike Schilling
Posts: n/a

"Tom Anderson" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)
> No. getClass() is final, not virtual, it is never overridden, and it does
> not behave like it has been overridden. Rather, it behaves like its
> implementation was:
> public Class getClass() {
> return this.class;
> }
> Where all objects have a secret magic hidden field called 'class' which is
> set by the VM when they are allocated.

That's how I've always thought about it, particularly since in 4GLs I've
helped implement, that's exactly what the analogous method did.

Reply With Quote

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
own initialization before calling parent's constructor avasilev C++ 23 12-09-2011 01:54 PM
A constructor calling another constructor (default constructor)? Generic Usenet Account C++ 10 11-28-2007 04:12 AM
Avoid calling non-final methods in a constructor: Applies to static methods too? Oliver Wong Java 14 06-13-2006 09:18 AM
Calling own-constructors inside another constructor EdUarDo Java 4 12-21-2005 12:23 PM
why it's not possible calling constructor from constructor? Giulio C++ 9 06-25-2003 03:56 PM