Question: In Java: 1. Initialize an array that holds 4 double values: 10.0, 22.0, 5.0, 30.0 2. Which statement assigns memory address for an array: A.

In Java:

1. Initialize an array that holds 4 double values: 10.0, 22.0, 5.0, 30.0

2. Which statement assigns memory address for an array:

A. int{} nums = new int[10];

B. nums int = int [10];

C. nums int [] = new int[10];

3.

public class Test{

public static void main(String [] args) {

p(4, 5.0); //a. . p(5.0, 4.0); //b. p(4.0, 5); //c.

}

public static double p(int x, double y) { //1

statement;

}

public static double p(double x, double y) { //2

statement;

}

}

}

Identify the method invoked for c. //1 or //2?

A. 1

B. 2

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!