Trying to run a simple program just need to fix the syntax


trying to run a simple program just need to fix the syntax and semantic errors with the command

package totalweight;

/**
*
* @author Andrew
*/
public class Totalweight {

/**
* @param args the command line arguments
*/
public static void main(String[] args) {
int weightOfLoaf = 16;// ounces per loaf
int numberOfLoaves = 4;


system.out.print ("with a weight of " +weightOfLoaf + "ounces in each loaf")
system.out.printin ("and a total of " + numberOfOLoaves +"loaves, ");
int totalweight = weightOfLoaf + numberOfLoaves;
system.out.printin ("the total weight of all " + numberOfLoaves + " loaves is " + totalweight + "ounces.n")
}

Solution Preview :

Prepared by a verified Expert
JAVA Programming: Trying to run a simple program just need to fix the syntax
Reference No:- TGS02387391

Now Priced at $10 (50% Discount)

Recommended (99%)

Rated (4.3/5)