Win a copy of Node.js Design Patterns: Design and implement production-grade Node.js applications using proven patterns and techniques this week in the Server-Side JavaScript and NodeJS forum!

Jonathan Jeban, Martin

+ Follow
since Aug 16, 2000
Cows and Likes
Total received
In last 30 days
Total given
Total received
Received in last 30 days
Total given
Given in last 30 days
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Jonathan Jeban, Martin

what if there are still non-daemon threads running even tho when main thread had already finished? Will JVM then exit because main thread had finished?
No.It will wait till the non-daemon threads are finished.And then JVM exits. check this link whereMahaAnna has explained with example.
If u look closer on this line...
Rectangle rectangle = new Rectangle(point, 20, 20);
So reference to point does exists!
21 years ago

Yes, its available in India.
I bought it online (
It comes with some discount there.
Price is around Rs.350
21 years ago
Create an empty file and name it
compile it.
It compiles ,right?
21 years ago
Hi Jenny,
1. Yes, they are connected.
byte - Primitive type
Byte - Wrapper class for byte.Using this type of wrapper class u can manipulate primitives as objects.

2. see in
byte largestByte = Byte.MAX_VALUE;
MAX_VALUE is a static member in Byte class.
To access static members(fields) or methods , u neednt
create an object.
U can access them straightly by their class name followed
by field name.
3. class members are sometimes referred as "fields"

Hope this helps...
21 years ago
I have a Static inner class like this...
class Outer1{
static class Inner{
public void aMethod(){
System.out.println("Hello Inner World");
public static void main(String[] arg){
// insert code here

Outer1 o = new Outer1();
Inner in = Inner();
Outer1.Inner in = new Outer1().new Inner();
If I insert the option (a) in main method ,static inner class
method aMethod is called.
If I insert the option (b) in main method , Runtime error appears.(VerifyError is thrown.)
Couldn't anybody explain me why its both are valid ways to create instances...

21 years ago
Hi All,
I got reply from SUN regarding the date on which the new pattern will come into effect.The Date is : October 4 2000.
If anybody got questions u can mail to
Here is the link for Carl's Note:

Hi all,
I am new to this site and really like this site a lot
Its creative and informative.

After watching this discussion group for a time, I thought to get involved too..
Below is the constructor concepts that I have collected(from books and discussion groups(mostly javaranch),
and I thought it will be very helpful for those preparing the exam. Please correct me..if there be any mistake.

I also invite others to share concept based tips.If you all find it useful, I will post more like this...

1. A private constructor is legal and can be used to implement a Singleton.
2. constructors can ONLY be public/private/protected
3.constructor cannot be
native, abstract, final, synchronized, static
4.constructors cannot be final :
The keyword final when dealing with methods means the method cannot be overridden. Because constructors are never inherited and so will never have the opportunity to be overridden, final would have no meaning to a constructor.
5.Overloading constructors is a key technique to allow multiple ways of initializing classes.
6.some constructor rules:
(i)If you do not explicitly create a Constructor on a class a default No Arg constructor IS created
(ii)If you do create a customized Constructor with a Arg/Args, the default no arg will NOT be created
(iii)IF you create a Constructor in SubClass with or without arg, a call to super() ( the default no arg constructor of the parent) IS IMPLICITLY called unless you explicitly call super(args).
(iv)When you explicitly call a Parents constructor in the childs constructor it has to be the first line of code.
7.Applet with constructors:
constructor will be called before init. But be careful about using Applet stuff - it might not all be initialized yet. Initialization stuff should be performed in the init() because of something to do with the environment of the applet not being ready yet, when executing a constructor for the applet.
8) Math class have private constructors
The class is final but the constructor is private, that is why you cannot find any constructor in the API Doc.
9) Instance initializers are processed before constructors are invoked. Every class whether it is a superclass to some class or a subclass to another class can have static initializers as well as instance initializers.In each class the order of initialization is
1.All static initializers are executed from top to bottom of the inheritance hierarchy first.
2. Next From top to bottom , in each class the instance initialization and constructor code are executed at once and it goes down to next level.
3. The 2nd step is continued upto the bottom most class.
10) An anonymous class cannot have any constructors.
An anonymous class can only be created within the body of a method. That implies , A constructor is not a method and it can have anonymous classes declared in it.
11) a constructor may throw exception
One precaution there...
Per Bruce Eckel (TIJ, P-392) -
If your class is a derived class then its constructor must declare any base-class constructor exceptions in its exception specification.
Because a base-class constructor will always be called one way or another. ...and you can't put it inside a try loop, though you might want to.
12) abstract class MAY have constructors. example Component()
13) super and this can�t appear in the same constructor
14) The compiler never object to creating a local instance of the class being constructed in its constructor. If the ca;; produce an infinite loop, a runtime error will occur.
15) Constructors can�t be overridden. They can be overloaded, but only in the same class.