الرجوع
تسجيل الدخول
أنت تتصفح نسخة مؤرشفة من الموقع اضغط للانتقال إلى الموقع الجديد بكامل المزايا

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);