Total members 10261 | Gratitudes |It is currently Wed May 23, 2012 9:24 am Login / Join Codemiles


All times are UTC [ DST ]




Post new topic Reply to topic  Quick reply  [ 2 posts ] 
Author Question
 Question subject: Object without new Operator
PostPosted: Wed Oct 22, 2008 2:12 am 
Offline
Proficient
User avatar

Joined: Sun Oct 19, 2008 3:47 pm
Posts: 281
Has thanked: 0 time
Have thanks: 1 time

How to create a object of a final class without using new operator ?


TOP
 Profile Send private message  
Reply with quote  
 Question subject: Re: Object without new Operator
PostPosted: Wed Oct 22, 2008 2:13 am 
Offline
Proficient
User avatar

Joined: Sun Oct 19, 2008 3:53 pm
Posts: 229
Has thanked: 0 time
Have thanks: 0 time
yes , but you will have to casting . example :

Code:
String objStr = (String)Class.forName("java.lang.String").newInstance( );


as it returns a general object.


TOP
 Profile Send private message  
Reply with quote  
Post new topic Reply to topic Quick reply  [ 2 posts ] 
Quick reply


  

 Similar topics
 Usage of Request.ServerVariables object
 operator overloading
 Add texture to teapot object using
 Change the shading of object
 Java Object Reading
 Add spot light to object
 need help about object detection using haarTraining
 object detection
 working of bitwise ~ operator
 How to use connection object in jsp

All times are UTC [ DST ]


Users browsing similar posts

Users browsing this forum: Google Adsense [Bot] and 4 guests



Jump to:  
Previous Question | Next Question 




Home
General Talks
Finished Projects
Code Library
Games
Tutorials

Java
C/C++
C-sharp
php
Script
JSP/Servlets
Ajax
ASP/ASP.net
Google SEO
Database
Communications
Phpbb3 styles
Photoshop tutorials
Flash tutorials
Find a job






Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
All copyrights reserved to codemiles.com 2007-2011
mileX v1.0 designed by codemiles team