Monday, 7 August 2017

Fun Java Learning Part 1

Hello,

Thank you for reading this fun java learning blog.

Java

Java Acronym

Funny Acronym but true ;)

Java is object oriented programming language, which will give you instant job, pays you good bucks, inspires you a lot and challenge you everyday to became good developer.

OOPS Concept Inheritance

- Inheritance (Child -> Father -> GrandFather) also (you can say whole family)

One nice article

http://www.moralstories.org/developing-a-relationship/

Are u able to develop relationships?

Nita one class

class FatherOfNita{
protected String gender;
protected String attribute;
}

class Nita extends FatherOfNita{  //Inheritance Nita can access all the properties of FatherOfNita
//
}

class HusbandOfNita{
private Nita wife;
private String gender;
private String family;
}

class Life{
public static void main(String args[])
{
Nita nita = new Nita();
HusbandOfNita husbandOfNita =new HusbandOfNita();

//They married with eachother

}
}


Now some boring stuff :(

As per Oracle Docs definition of Inheritance

Definitions: A class that is derived from another class is called a subclass (also a derived classextended class, or child class). The class from which the subclass is derived is called a superclass (also a base class or a parent class).

Excepting Object, which has no superclass, every class has one and only one direct superclass (single inheritance). In the absence of any other explicit superclass, every class is implicitly a subclass of Object.

Classes can be derived from classes that are derived from classes that are derived from classes, and so on, and ultimately derived from the topmost class, Object. Such a class is said to be descended from all the classes in the inheritance chain stretching back to Object.


If you want to do Phd in Inheritance you can read in below link :)

Source: https://docs.oracle.com/javase/tutorial/java/IandI/subclasses.html

Now you are Doctor (Whatever your name) as you had Phd in Inheritance.

Thanks for reading and dont thank me as this article had made you reach till the level of Phd in Inheritance ;)