A jar of peanut butter costs $3.75 each and a jar of jelly a…
A jar of peanut butter costs $3.75 each and a jar of jelly are $2.54 each. Write the part of a Java program (comments are not necessary) that prompts for the number of jars of peanut butter and the number of jars of jelly and displays the total cost of the combined jars of peanut butter and jelly with two digits after the decimal point.An example run might look like this:Enter the jars of peanut butter: 3Enter the jars of jelly: 4The total cost is $21.41 You are not required to use comments or named constants. No loop is necessary. (12 pts)
Read Details