| Author |
exam question
|
soni madhuri
Greenhorn
Joined: Nov 06, 2009
Posts: 7
|
|
public class Stone{
public void myMethod(){
System.out.println("hgdsf");
}
}
public class BigStone{
public static void main(String args[])
{
BigStone[] b = new BigStone( new Stone(), new Stone(), new Stone());
}
}
Can we declare Stone objects like they are in the code.
please need an answer.
madhuri.
|
 |
Cameron Wallace McKenzie
author and cow tipper
Saloon Keeper
Joined: Aug 26, 2006
Posts: 4967
|
|
I'm not sure what you mean by declaring objects in your code. Certainly, you can create new objects in your code, so you code appears completely valid.
-Cameron McKenzie
|
Author of Hibernate Made Easy, What is WebSphere???, JSF 2.0 Made Easy and the SCJA Certification Guides
|
 |
 |
|
|
subject: exam question
|
|
|