I have just embarked on a Java programming course and have been given a task to work out the volume of a cylinder in cubic inches with a given radius and height. and then to convert it from cubic inches to to cubic Cm's which i have done fine.
My problem is it wont complie with an error on one of the
System.out.print
lines that i have in the program
i have checked that i have the syntax correct and it still wont compile.
Would some one be able to give me some advice
I know this is going to sound like a totaly dumb request but hey we all have to start somewhere dont we
grifflyn 0 Newbie Poster
Recommended Answers
Jump to PostI slightly modified your post's topic to make it more polite. " Very New to Java and need help ASAP" implied that you deserve precedence over someone else's post, which is kind of considered poor etiquette. Additionally, your thread title has no relevance to your actual question. Creating a relevant …
Jump to PostYou have alot of conversion problems that need to be fixed. But even when they are fixed the program doesnt really work the way you have it. If you want to convert the input to a double do something like this:
Double d = Double.valueOf(BufferedReaderVariableName.readLine().trim());
double d2 = d.doubleValue();
All 7 Replies
Narue 5,707 Bad Cop Team Colleague
jerbo 0 Junior Poster in Training
nanosani 20 Technize.net addict Team Colleague
alc6379 120 Cookie... That's it Team Colleague
grifflyn 0 Newbie Poster
grifflyn 0 Newbie Poster
server_crash 64 Postaholic
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.