This week's book giveaway is in the OO, Patterns, UML and Refactoring forum.
We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line!
See this thread for details.
The moose likes Java in General and the fly likes meaning?? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


JavaRanch » Java Forums » Java » Java in General
Bookmark "meaning??" Watch "meaning??" New topic
Author

meaning??

Donald Wynn
Greenhorn

Joined: Dec 04, 2002
Posts: 29
What is this code doing:
InputVars inputParamMethods = new InputVars();
InputVars[] inputParams;
John Lee
Ranch Hand

Joined: Aug 05, 2001
Posts: 2545
Originally posted by Donald Wynn:
What is this code doing:
InputVars inputParamMethods = new InputVars();
InputVars[] inputParams;

You defined a InputVars class before, now you create an object of class InputVars.
Then you create an array of class InputVars object.
Cindy Glass
"The Hood"
Sheriff

Joined: Sep 29, 2000
Posts: 8521
Note that in the first statement you are declaring a variable of type InputVars and then setting it equal to the result of calling the constructor InputVars().
In the second statement you are ONLY declaring a variable which is an array of InputVars. You did not initialize it with any value.


"JavaRanch, where the deer and the Certified play" - David O'Meara
 
I’ve looked at a lot of different solutions, and in my humble opinion Aspose is the way to go. Here’s the link: http://aspose.com
 
subject: meaning??
 
It's not a secret anymore!