File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes C / C++ and the fly likes Creating object of class problem Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Languages » C / C++
Reply 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
Inner Classes when to use them?
adding properties to classes using extend() and include()
Overloading Problem
How to invoke java.lang.reflect.Method with JDI java options
object creation in java