Syntax
import java.*;
import java.io.*;

class Emp
{
 float salary = 40000;
 }
 
class Programmer extends Emp
{
  int bonus =10000;
   public static void main(String arg[])
    {
  Programmer obj = new Programmer();
   System.out.println("Programmer salary is "+obj.salary);
   System.out.println("Programmer salary is "+obj.bonus);
  }
 } 
OUTPUT

Programmer salary is : 40000.0
Bonus of Programmer is : 10000

See How to Implement This Program :
please Subscribed this tutorial to : Click here

Leave a Reply

Subscribe to Posts | Subscribe to Comments

All Notes on BCA

All Notes  on BCA
BCA all subjects notes

Total Pageviews

Translate

Powered by Blogger.

Copyright © All Notes on BCA