jQuery in Action, 2nd edition*
The moose likes Beginning Java and the fly likes lost n confussed Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "lost n confussed" Watch "lost n confussed" New topic

lost n confussed

mike hew

Joined: Oct 26, 2006
Posts: 27
The stuff in bold within the code is my area of question.
I try'd the following below the code, but that isn't it, where Am I going a stray?

Attempted code
Deepak Bala

Joined: Feb 24, 2006
Posts: 6661

You need to be a bit more specific about whats going wrong. I can see a syntax error for a missing comma where you instantiate the shapes.

new Sphere (shapes[index]

It looks like you have to read 4 parameters and based on their values you instantiate shapes. Tell us what compiling issues you faced and post the constructors of your shapes if possible. Also you need to assign the shapes[index] to a shape, not include them in the method call. Add the default else for the error message too.

SCJP 6 articles - SCJP 5/6 mock exams - More SCJP Mocks
I agree. Here's the link: http://aspose.com/file-tools
subject: lost n confussed
Similar Threads
enhanced for loop hangup?
Null Pointer Exception
Where am I getting this from?
the instance variable shapes