Tommy Cregan

Greenhorn
+ Follow
since Nov 11, 2012
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Tommy Cregan

Hi all,

Ive been asked to create a class that has a static method which displays the total result of 3 user input results(the first and second are 15% and the third is 70%) but im getting an error due to what i think is
outputting a string which contains a double. Please help! Heres the code




HERES THE ERROR:


found : java.lang.String
required: java.lang.Double
return String.format("The answer is: %g",ans);
^
1 error


11 years ago