Qus:    What is the output of the following Java program? 1. public class Test 2. { 3. Test(int a, int b) 4. { 5. System.out.println("a = "+a+" b = "+b); 6. } 7. Test(int a, float b) 8. { 9. System.out.println(
Mar 16, 2022 17:25 Java 1 Answers Views: 1187 Kail Foster
Prev Next
Answers (1)
JOHN123 Feb 17, 2021 18:25
Answer:   The output of the following program is:
a = 10 b = 15
Here, the data type of the variables a and b, i.e., byte gets promoted to int, and the first parameterized constructor with the two integer parameters is called.

Post Your Answer
Guest User

Not sure what solution is right for you?

Choose the right one for you.
Get the help of the experts and find a solution that best suits your needs.


Let`s Connect