dev-resources.site
for different kinds of informations.
Day14 Inheritance:
Published at
12/29/2024
Categories
payilagam
java
programming
chennai
Author
reegan
Main Article
Author
6 person written this
reegan
open
INHERITANCE:
* Inheritance is implemented using the extends keyworrds.
* Inheritance in java is a mechanism where one class child or subclass acquires the properties and behaviors fields and methods of another class parent or superclass.
* subclass (child) - the class that inherits from another class
* superclass (parent) - the class being inherited from To inherit from a class, use the extends keyword. #
Example program:
package reegan;
class Dad
{
int money=2000;
}
class son extends dad
{
}
public class mainclass
{
public static void main(String []args)
{
son s1=new son();
System.out.println(s1.money);
}
}
payilagam Article's
30 articles in total
Python List Tutorial Day2
read article
System.out.println()
read article
Python List Tutorial
read article
String Functions Examples
read article
Front end day-1 (html,css)
read article
About IRC - Internet Relay Chat
read article
Python Day-29 Dictionary- Exercises, Tasks
read article
LCM & GCD of two numbers
read article
Weekend - Python Interview Questions
read article
Day14 Inheritance:
currently reading
Python day-28 Dictionary, Frequency of character using nested loops
read article
Objects
read article
System.out.println()
read article
Constructor
read article
Introduction
read article
Python Day-25 List functions, Tasks
read article
Day 12 Constructor in java:
read article
Day 4 - Dec 23 -->java simple program
read article
Day-5 Example for Encapsulation
read article
Day 11 Encupsulation
read article
Day 11 Today class:
read article
Day - 1 Task 1
read article
Day 10 Task:
read article
java task 3
read article
Day9 :Task2
read article
Java Constructors
read article
java task 3
read article
java 3 task
read article
java task1
read article
Python Day-23 Lists and list functions,Task
read article
Featured ones: