File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Junior/Associate Certification (SCJA,OCAJ 5/6/8) and the fly likes exam question Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Certification » Junior/Associate Certification (SCJA,OCAJ 5/6/8)
Bookmark "exam question" Watch "exam question" New topic

exam question

soni madhuri

Joined: Nov 06, 2009
Posts: 7
public class Stone{

public void myMethod(){

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.

Cameron Wallace McKenzie
author and cow tipper
Saloon Keeper

Joined: Aug 26, 2006
Posts: 4968

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
I agree. Here's the link:
subject: exam question
It's not a secret anymore!