Hi ,

we can create object without using new opearator.



1) Using factory methods

Ex:- NumberFormat obj=NumberFormat.getInstance();



2)Using newInstance() method

Ex:- 

     Class c=Class.forName("SomeClassName");

     SomeClassName obj=c.newInstance();



3)using cloning

 Ex:- ClassName c1=new ClassName();

        ClassName c2=c1.clone();
                
                

                

                
                

                

                

                

                
                         




Thanks and regards,
  Santhosh.P

--- On Thu, 26/11/09, prabu vaikundanarayanan <prabu...@gmail.com> wrote:

From: prabu vaikundanarayanan <prabu...@gmail.com>
Subject: [java ee programming]
To: java-ee-j2ee-programming-with-passion@googlegroups.com
Date: Thursday, 26 November, 2009, 12:54 PM

hi every one,,


          could any one please tell me how to create objects with out
using new keyword


thanks in advance


Regards
Prabu

-- 
You received this message because you are subscribed to the Google
Groups "Java EE (J2EE) Programming with Passion!" group.
To post to this group, send email to
java-ee-j2ee-programming-with-passion@googlegroups.com
To unsubscribe from this group, send email to
java-ee-j2ee-programming-with-passion+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/java-ee-j2ee-programming-with-passion?hl=en?hl=en



      The INTERNET now has a personality. YOURS! See your Yahoo! Homepage. 
http://in.yahoo.com/

-- 
You received this message because you are subscribed to the Google
Groups "Java EE (J2EE) Programming with Passion!" group.
To post to this group, send email to
java-ee-j2ee-programming-with-passion@googlegroups.com
To unsubscribe from this group, send email to
java-ee-j2ee-programming-with-passion+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/java-ee-j2ee-programming-with-passion?hl=en?hl=en

Reply via email to