Question: Q 1) Let us consider the example of JAVA given below. This program calculates minimum of two numbers. Fill in the given blanks with correct

Q 1) Let us consider the example of JAVA given below. This program calculates minimum of two numbers. Fill in the given blanks with correct statements. [Marks 4]

class chkMaximum{

______________ maxFunction(double n1,double n2) {

double max;

if (n1 > n2)

max = n1;

else

max = n2;

return max; }}

public class Test{

public static void main(String[] args) {

double a = 12.5;

double b = 6.5;

// maxFunction called

double c = ______________

System.out.println("Maximum Value = "+ c);

}}

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!