The Source for Java Technology Collaboration

Home » java.net Forums » JDK » Java Quick Starter

Thread: "reached end of file while parsing"

Welcome, Guest Help
Login Login
Guest Settings Guest Settings
Reply to this Thread Reply to this Thread Search Forum Search Forum Back to Thread List Back to Thread List

Permlink Replies: 0 Threads: [ Previous | Next ]
treezwithgunz

Posts: 1
"reached end of file while parsing"
Posted: Oct 10, 2009 2:47 PM
  Click to reply to this thread Reply

I am trying to write a program that will give me the volume of a cylinder when I run it. I already have a Circle class that computes the area of a circle. I am also using a seperate program to handle the input and output. Could someone tell me what I am doing wrong with my program?

public class Cylinder
{
// calls up and creates an object from the Circle class

Private Circle base;
Private double Height;

//Constructor
Public Cylinder(double h, double r)
{
// creates object from cirle class
Circle base = new circle(r);
height = h;
}
public double getVolume()
{
return CircleBase.area * height;
}
}




 XML java.net RSS