Question: when entering this java code: public class LiquidMeasurement { public static void main ( String [ ] args ) { double milk = 0 .

when entering this java code: public class LiquidMeasurement {
public static void main(String[] args){
double milk =0.75;
double water =1.25;
System.out.println("The value of milk is "+ milk +" and the value of water is "+ water);
}
}
it comes back with these errors: error java compiler:
Error found after student code on line 11: expected
Answer.java line 7
error java compiler:
Error found after student code on line 11: illegal start of type
Answer.java line 7
error java compiler:
Error found after student code on line 13: class, interface, enum, or record expected
Answer.java line 7
error java compiler:
illegal start of expression
Answer.java line 1
And i cant figure out how to fix this

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!