The professional, friendly Java community. 21,500 members and growing!

The Java Programming Forums are a community of Java programmers from all around the World. Our members have a wide range of skills and they all have one thing in common: A passion to learn and code Java. We invite beginner Java programmers right through to Java professionals to post here and share your knowledge. Become a part of the community, help others, expand your knowledge of Java and enjoy talking with like minded people. Registration is quick and best of all free. We look forward to meeting you.

Notice how you have a double named radius and a String named radius? Well, when you make the statement radius=radius, it is looking at the variable with the most relevant scope, which means it is looking at the radius variable that is a String. So, you are setting the String radius to be equal to the String radius.

You also probably meant to set radius equal to radius1.

So, to fix this problem you have two options.
1) Since your double radius is a class variable, you can use the this.variable declaration, as shown below:

When asking for help, please follow these guidelines to receive better and more prompt help:
1. Put your code in Java Tags. To do this, put [highlight=java] before your code and [/highlight] after your code.
2. Give full details of errors and provide us with as much information about the situation as possible.
3. Give us an example of what the output should look like when done correctly.

Join the Airline Management Simulation Game to manage your own airline against other users in a virtual recreation of the United States Airline Industry. For more details, visit: http://airlinegame.orgfree.com/