Consider the following class declaration. public class Samp…
Questions
Cоnsider the fоllоwing clаss declаrаtion. public class Sample { private int a; private double b; public Sample(int x, double y) { a = x; b = y; } // No other constructors } The following method appears in a class other than Sample. public static void test() { Sample object = new /* missing constructor call */ ; } Which of the following could be used to replace /* missing constructor call */ so that the method will compile without error?