Question: Write a method named sumPrint that takes in two double parameters and prints their sum to the console using the printf method (print two didigits

Write a method named sumPrint that takes in two double parameters and prints their sum to the console using the printf method (print two didigits after the decimal point). For example, if you had the following calls to your sumPrint method:

public class Meth1 { public static void main(String [] args) { sumPrint(1.1, 3.3333); sumPrint(2.0, 5.0); } // Your sumPrint method goes here } 

then it would print out the following to the console:

1.10 plus 3.33 is 4.43 2.00 plus 5.00 is 7.00

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 Databases Questions!