الرجوع
تسجيل الدخول
هذه نسخة مؤرشفة قديمة من الموقع انتقل إلى كاتوديمي ←

Given the following Java classes:

class Employee {  
 float salary = 40000;  
}  
class Programmer extends Employee {  
 int bonus = 10000;  
}

What is the output of the following code?

Programmer p = new Programmer();
System.out.println("Programmer salary is:" + p.salary);