BJ - SCJP and SCWCD
We love Java programming. It is contagious, very cool, and lot of fun. - Peter Coad, Java Design
Crazy Bikes created by m-Power
BJ - SCJP and SCWCD
We love Java programming. It is contagious, very cool, and lot of fun. - Peter Coad, Java Design
Crazy Bikes created by m-Power
BJ - SCJP and SCWCD
We love Java programming. It is contagious, very cool, and lot of fun. - Peter Coad, Java Design
Crazy Bikes created by m-Power
Make visible what, without you, might perhaps never have been seen.
- Robert Bresson
BJ - SCJP and SCWCD
We love Java programming. It is contagious, very cool, and lot of fun. - Peter Coad, Java Design
Crazy Bikes created by m-Power
JavaBeginnersFaq
"Yesterday is history, tomorrow is a mystery, and today is a gift; that's why they call it the present." Eleanor Roosevelt
Originally posted by Prashanth Joisha:
Why is the piece of code in (1) more "advantageous" than
approach (2)
Smile aSmile= (Smile)getClass().getClassLoader().loadClass("Smile").newInstance(); // (1)
Smile aSmile = Class.forName("Smile").newInstance(); // (2)
JavaBeginnersFaq
"Yesterday is history, tomorrow is a mystery, and today is a gift; that's why they call it the present." Eleanor Roosevelt
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime. |