The inheritance type in this code is multilevel inheritance and hierarchical inheritance
@Mr.Aravindhan172 ай бұрын
package pro2; class Person { String name; Person(String name) { this.name = name; System.out.println(name); } } class Employee extends Person { int Employeeid; Employee() { super("Default Name"); System.out.println("test"); } void display() { System.out.println("Detail of employee"); } } public class Mainclass2 { public static void main(String[] args) { // Person p1 = new Person("vijay"); Employee e1 = new Employee(); e1.display(); } }
@vigneshm.2k2_officl3 күн бұрын
super clear
@ErrorMakesCleverКүн бұрын
Thank you!
@Snekavarsha-sx3no5 ай бұрын
brother please next vidoes seekiram upload pannunga naa unga video kaka tha rompa naal wait panne inheritance ku aprm en class la nadathurathu suthama puriyala ippo exams vachutanga java la naa unga videos sa nambi tha irukke
@Binge4665 ай бұрын
Upload videos often dude
@MohanS-ev3we5 ай бұрын
Hi bro core java one video podunga bro
@Moviesxw2 ай бұрын
c++ video podunga bro
@PivotPlay7774 ай бұрын
Director "PARTHIBAN " VOICE
@Vikram.veeran5 ай бұрын
❤❤
@Prakash-qg3yc5 ай бұрын
Bro one doubt you're creating object for class Employee and passing args as John, now here is the confusion starts for me,now the John parameter will straightly assigned in super(name(John)); like this, or the John parameter will be assigned in Employee (String name(John)) and further it goes to super ? If the the employee object directly assign its parameter (John) to super (name(John)) then what will be the value of Employee class constructor Employee (String name(?)). Please reply for this comment,if anyone knows please do reply for this comment Thank you
@SURYAPRAKASH-tp6bf5 ай бұрын
Yes, 2nd one.. the John parameter will be assigned in Employee (String name(John)) and further it goes to super
@SadiqsChannel4 ай бұрын
The name property belongs to the Person class, the Employee constructor receives the name and passes it to super class property name. Assume that the Employee class also has a property called name, then in the constructor of Employee, you code like super(name); this.name=name; This means the name property is first assigned to Employee then passed to Person
@PoornimaManogaran-245 ай бұрын
I have one doubt....Why we have to use super.makesound()? We had already used d1.makesound() this also does the same.🤔.Pls reply me whether I'm correct or not?
@kishore.g27455 ай бұрын
Yes bro you can
@indirajithl18665 ай бұрын
while inheriting parent class(Person) from child class (Employee) how many objects would be created in the heap?
@SadiqsChannel4 ай бұрын
One object, that contains both Person and Employee fields (member variables)
@sathishkraja21305 ай бұрын
Bro next video poduga please
@madhumitha130118 күн бұрын
class person { person (String name){ System.out.println(name); } } class employee extends person { int employee_id; employee () { Super("sam"); } void details () { System.out.println("Employee details"); } } public class MainClass{ public static void main (String[] args) { employee e1=new employee (); e1.employee_id=7; e1.details; } } Can anyone please tell is this correct???
@RAMUTAMILAN8375 ай бұрын
Hi
@user-name-is-Arasu5 ай бұрын
Elarum indha run pani pathinagala enaku varala ungaluku?
@SATHISHKUMAR-cs3kv4 ай бұрын
Bro enaku 1st code laye error varudhu I mean Animal and Dog code laye error varudhu but na crt ah than code potten error: can't find (String []) method in class :Animal epdi varudhu
@user-xk6qz9xi3q4 ай бұрын
Same error I faced😢 for past one week
@wssgaming70504 ай бұрын
Bro main class ahh first la potuga error clear akirum
@dragogaming_redmi3 ай бұрын
Main Ilene , programku enge start pannumnu theriyathu
@mageswaran._r_2 ай бұрын
Program main function la dhan execution start agum so that main function entha clss la iruko atha name la save pannanum