Create object programmatically

New member
Posts: 2
Joined: September 14th, 2015, 10:11 pm

Create object programmatically

Postby timmee2222 » October 25th, 2015, 2:10 am

Is there an API (preferably for JAVA) for creating objects?

User avatar
Posts: 317
Joined: February 16th, 2007, 3:27 am
Location: Odessa, UA

Re: Create object programmatically

Postby Ajax » October 27th, 2015, 6:59 am

Unfortunately not. However application imports from 3DS, COLLADA or SKP and I guess you can find several frameworks where these formats are supported.
** SCOTT Genius for YevGenius ;) ** MTB Rider **
New member
Posts: 1
Joined: August 8th, 2017, 1:04 am

Re: Create object programmatically

Postby Aaliyah » August 8th, 2017, 4:58 am

There are four different ways to create objects in java:

A. Using new keyword
This is the most common way to create an object in java. Almost 99% of objects are created in this way.

MyObject object = new MyObject();
B. Using Class.forName()
If we know the name of the class & if it has a public default constructor we can create an object in this way.

MyObject object = (MyObject) Class.forName("subin.rnd.MyObject").newInstance();
C. Using clone()
The clone() can be used to create a copy of an existing object.

MyObject anotherObject = new MyObject();
MyObject object = (MyObject) anotherObject.clone();
D. Using object deserialization
Object deserialization is nothing but creating an object from its serialized form.

ObjectInputStream inStream = new ObjectInputStream(anInputStream );
MyObject object = (MyObject) inStream.readObject();

Hope it might help you :)

SEO Services in Lucknow | Android App Development

Return to “Live Interior 3D for Windows”

Who is online

Users browsing this forum: No registered users and 1 guest