Question: 21. A constructor is a special method which is commonly used to set the initial values of an object's fields O True False 22. How

 21. A constructor is a special method which is commonly used

to set the initial values of an object's fields O True False

21. A constructor is a special method which is commonly used to set the initial values of an object's fields O True False 22. How would you instantiate the Employee class from a main method located in another class? public class Employeet private String name private double salary public Employee(String n, double s) name = n; salary = s; O Employee empl = new Employee(); O Employee empl new Employee(50000); O Employee empi-new Employee(50000, "Syam) O Employee empl new Employee("Syam", 50000); 23. Methods can call other methods in the same class O True False 24. Which three can vary in overloaded methods? Choose all correct answers) Order of parameters. Types or parameters. Method return type. | The names of parameters Number of parameters. 25. All overloaded methods share the same name. True False

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!