www.delorie.com/gnu/docs/gcc/gcj_40.html   search  
 
Buy the book!


Guide to GNU gcj

[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

10.9.3 Object Constructors

Constructors are called implicitly as part of object allocation using the new operator.

For example:

 
java::lang::Integer *x = new java::lang::Integer(234);

Java does not allow a constructor to be a native method. This limitation can be coded round however because a constructor can call a native method.


  webmaster     delorie software   privacy  
  Copyright 2003   by The Free Software Foundation     Updated Jun 2003