File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
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

Win a copy of REST with Spring (video course) this week in the Spring forum!
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: 6662

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:
subject: lost n confussed
It's not a secret anymore!