This week's book giveaway is in the Other Languages forum.
We're giving away four copies of Functional Reactive Programming and have Stephen Blackheath and Anthony Jones on-line!
See this thread for details.
Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

exam question

 
soni madhuri
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 4968
1
Hibernate Spring Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic