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 | Flagged Topics | Hot Topics | Zero Replies
Register / Login
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
Overloading Problem
How to invoke java.lang.reflect.Method with JDI java options
object creation in java
Inner Classes when to use them?
adding properties to classes using extend() and include()