This week's book giveaway is in the OO, Patterns, UML and Refactoring forum.
We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line!
See this thread for details.
The moose likes Java in General and the fly likes new instance Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

JavaRanch » Java Forums » Java » Java in General
Bookmark "new instance" Watch "new instance" New topic

new instance

Venu Navat
Ranch Hand

Joined: Dec 28, 2004
Posts: 30
can we create an object for a class without using new keyword?how?/

-Venu Navat
marc weber

Joined: Aug 31, 2004
Posts: 11343

Well, there are special cases like String, Array, and (with 5.0 autoboxing) wrappers. But for general cases, there's the Class class...

Note that "newInstance" is a method name in Class, so "new" is not being used as a keyword.

"We're kind of on the level of crossword puzzle writers... And no one ever goes to them and gives them an award." ~Joe Strummer
Venu Navat
Ranch Hand

Joined: Dec 28, 2004
Posts: 30
thanks marc weber.........i got it......
I’ve looked at a lot of different solutions, and in my humble opinion Aspose is the way to go. Here’s the link:
subject: new instance
It's not a secret anymore!