java
Posted: Sun May 15, 2022 12:56 pm
java
QUESTION 13 Which of the following is the correct onstructor overloading. O A. class Hospital private int doctors, nurses; private double salaries; public Hospital(int doctors, int nurses) { doctors = doctors; public Hospitalint doctors) { this. doctors= doctors; } public Hospital(double salaries) { this.salaries= salaries nurses = nurses, } } O B. class Hospital private int doctors, nurses, private double salaries, public Hospital1(int doctors, int nurses) { this.doctors = doctors; this.nurses = nurses; } public Hospital2(int doctors) { this. doctors=doctors; } public Hospital3(double salaries) { this.salaries= salaries }} O c. class Hospital { private int doctors, nurses, private double salaries, public Hospital(int doctors, int nurses) { this.doctors = doctors; this.nurses = nurses; } public Hospitalint doctors) { this. doctors= doctors; } public Hospital(double salaries) { this.salaries= salaries }} O D. class Hospital { private int doctors, nurses; private double salaries; public Hospital(int nurses) { this.nurses = nurses; } public Hospital(int doctors) { this. doctors= doctors; } public Hospital(double salaries) { this. salaries= salaries }} QUESTION 14 Why is Java a platform independent language? O A. Java language was developed in such a way that it does not depend on any hardware or software due to the fact that the compiler compiles the code and then converts it to platform- independent byte code which can be run on multiple systems. The only condition to run that byte code is for the machine to have a runtime environment (JRE) installed in it. O B. Java language was developed in such a way that it does not depend on any hardware or software due to the fact that the compiler compiles the code and then converts it to platform- independent byte code which can be run on multiple systems. O C. Java language was developed in such a way that it does not depend on any hardware or software due to the fact that the compiler compiles the code first O D.Java language depends on any its runtime environment (JRE).
QUESTION 13 Which of the following is the correct onstructor overloading. O A. class Hospital private int doctors, nurses; private double salaries; public Hospital(int doctors, int nurses) { doctors = doctors; public Hospitalint doctors) { this. doctors= doctors; } public Hospital(double salaries) { this.salaries= salaries nurses = nurses, } } O B. class Hospital private int doctors, nurses, private double salaries, public Hospital1(int doctors, int nurses) { this.doctors = doctors; this.nurses = nurses; } public Hospital2(int doctors) { this. doctors=doctors; } public Hospital3(double salaries) { this.salaries= salaries }} O c. class Hospital { private int doctors, nurses, private double salaries, public Hospital(int doctors, int nurses) { this.doctors = doctors; this.nurses = nurses; } public Hospitalint doctors) { this. doctors= doctors; } public Hospital(double salaries) { this.salaries= salaries }} O D. class Hospital { private int doctors, nurses; private double salaries; public Hospital(int nurses) { this.nurses = nurses; } public Hospital(int doctors) { this. doctors= doctors; } public Hospital(double salaries) { this. salaries= salaries }} QUESTION 14 Why is Java a platform independent language? O A. Java language was developed in such a way that it does not depend on any hardware or software due to the fact that the compiler compiles the code and then converts it to platform- independent byte code which can be run on multiple systems. The only condition to run that byte code is for the machine to have a runtime environment (JRE) installed in it. O B. Java language was developed in such a way that it does not depend on any hardware or software due to the fact that the compiler compiles the code and then converts it to platform- independent byte code which can be run on multiple systems. O C. Java language was developed in such a way that it does not depend on any hardware or software due to the fact that the compiler compiles the code first O D.Java language depends on any its runtime environment (JRE).