aspose file tools*
The moose likes C / C++ and the fly likes Creating object of class problem Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Java 8 in Action this week in the Java 8 forum!
JavaRanch » Java Forums » Languages » C / C++
Bookmark "Creating object of class problem" Watch "Creating object of class problem" New topic
Author

Creating object of class problem

shishir dwivedi
Greenhorn

Joined: Jun 04, 2012
Posts: 9
let there be a class CA

class CA
{
public :
void fun()
{
//do something
}
};

int main()
{
CA obj;
obj.fun();
// CA *obj=new CA();
obj->fun();
}






what is the difference between creating CA obj then calling function and creating CA obj=new CA then calling function?
what implication can this code can do in project ?
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Creating object of class problem
 
Similar Threads
adding properties to classes using extend() and include()
Overloading Problem
How to invoke java.lang.reflect.Method with JDI java options
Inner Classes when to use them?
object creation in java