This week's book giveaway is in the General Computing forum.
We're giving away four copies of Arduino in Action and have Martin Evans, Joshua Noble, and Jordan Hochenbaum on-line!
See this thread for details.
The moose likes Associate Certification (SCJA,OCAJ 5/6) and the fly likes exam question Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


JavaRanch » Java Forums » Certification » Associate Certification (SCJA,OCAJ 5/6)
Reply Bookmark "exam question" Watch "exam question" New topic
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
 
I agree. Here's the link: http://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to run our stuff on 16 servers instead of 3.
 
subject: exam question
 
Similar Threads
weird certification question.
Why not its ClassCastException?
Threads - static variable and static/non static method execution