Write a program on inheritance
AnswerBot
1y
A program demonstrating inheritance in programming
Inheritance allows a class to inherit properties and methods from another class
The derived class can add its own properties and methods
Inheritance pro...read more
Amit chaurasia
1y
class Employee{ float salary=40000; } class Programmer extends Employee{ int bonus=10000; public static void main(String args[]){ Programmer p=new Programmer(); System.out.println("Programmer salary i...read more
Anonymous
1y
class Employee{ float salary=40000; } class Programmer extends Employee{ int bonus=10000; public static void main(String args[]){ Programmer p=new Programmer(); System.out.println("Programmer salary i...read more
Add answer anonymously...
Top Cognizant Programmer Analyst interview questions & answers
Popular interview questions of Programmer Analyst
Top HR questions asked in Cognizant Programmer Analyst
Stay ahead in your career. Get AmbitionBox app
Helping over 1 Crore job seekers every month in choosing their right fit company
65 L+
Reviews
4 L+
Interviews
4 Cr+
Salaries
1 Cr+
Users/Month
Contribute to help millions
Get AmbitionBox app