Question: 2. Assuming there exists a Java class named Fruits, which can create an instance named f of the Fruits class that calls the default

2. Assuming there exists a Java class named "Fruits", which can create

2. Assuming there exists a Java class named "Fruits", which can create an instance named "f of the "Fruits" class that calls the default constructor for initialization? A. Fruits(fl) = new Fruits(); B. Fruits f1 = new(); C. Fruits fl new Fruits(); D. Fruits *fl=new Fruits(); E. Fruits *fl new Fruits; 4. Given the following code, which is the correct way to create an object using the parameterized constructor? class Elmo { int age; double length; char model; Elmo (int a, double 1, char m) { age = a; length = 1; model = m; } } A. Elmo el = new Elmo('Y', 5.6, 7); B. Elmo el = new Elmo(5.6, 'Y', 7); C. Elmo el = new Elmo(7, 'Y', 5.6); D. Elmo el new Elmo(5.6, 7, 'Y'); E. Elmo e1 = new Elmo(7, 5.6, 'Y'); 5. Which is an acceptable declaration of a Java nested class named "Outer"? A. public class Outer { class Inner { } } B. public class Outer { public class Inner { } } C. public class Outer { static class Inner { } } D. public class Outer { private class Inner { } } E. All of the options

Step by Step Solution

3.36 Rating (162 Votes )

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock

The detailed answer for the above question is provided below Answer 2 C Fruits f1 new Fruits 1 The s... View full answer

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