This week's giveaways are in the MongoDB and Jobs Discussion forums. We're giving away four copies of Mongo DB Applied Patterns and 4 resume reviews from Five Year Itch and have the authors/reps on-line! See this thread and this one for details.
1) Vector v = null; v = new Vector(); v = mgr.displayUser(); 2) // no initialisation and instantiation Vector v = mgr.displayUser(); 3) // initialisation only Vector v = null; Vector v = mgr.displayUser(); Do i need to initialise or instantiate the class Vector before the method "displayUser() returned it as vector? In fact, all approaches are working. But what i concerned is which one performs better and waste not much resources.
Joined: May 22, 2003
Hi, What does this object and method do? v = mgr.displayUser();
"If anything can go wrong, it will"
Joined: Oct 29, 2002
Kaz Yosh, Basically, displayUser() will return the user details in Vector form.