+ 14

What is the best way to implement inheritance in order to understand it?

Its quite difficult to deal with OOPs concepts in Java for me. Where can I find problems to implement them so that I can learn better? Please Help :)

21st Jun 2018, 6:35 AM
Abhishek Tandon
Abhishek Tandon - avatar
14 ответов
+ 13
https://www.codesdope.com/practice/ this site has some good problems on almost every concept.. you can learn about the concept as well...
21st Jun 2018, 7:04 AM
Saurabh Tiwari
Saurabh Tiwari - avatar
+ 22
Infinity 👍 I'll set up a link for the book about the OOP If you can, you read it, it helped me! 😉
21st Jun 2018, 7:30 AM
Danijel Ivanović
Danijel Ivanović - avatar
+ 21
21st Jun 2018, 8:14 AM
Danijel Ivanović
Danijel Ivanović - avatar
+ 9
Eg Parent class: class Van1{ public int fuel=2; } Child class: class Toyota extends Van{ } class Main{ public static void main(String[] atgs){ Van v= new Toyota(); //Toyota class can access Van's item } }
22nd Jun 2018, 1:28 PM
Muhd Khairul Amirin
Muhd Khairul Amirin - avatar
+ 7
whoa!! 11xps after a long time thnx bro!!😉 and you are welcome 😄
21st Jun 2018, 7:16 AM
Saurabh Tiwari
Saurabh Tiwari - avatar
+ 5
code a program to represent a family that's all😉
21st Jun 2018, 7:00 AM
Adarsh.n. Bidari
Adarsh.n. Bidari - avatar
+ 5
Saurabh Tiwari Thank you so much bro!!
21st Jun 2018, 7:04 AM
Abhishek Tandon
Abhishek Tandon - avatar
+ 5
https://www.codesdope.com/practice/ this site has some nice problems on almost every concept.. you can learn better about the concept there you should trust Infinity........
22nd Jun 2018, 1:46 AM
Qwer
+ 4
Danijel Ivanović Thank you so much 😊
21st Jun 2018, 8:07 AM
Abhishek Tandon
Abhishek Tandon - avatar
+ 4
animal - mammal - dog - cat Implement a hierarchy something like that. A method say speak( ) in the animal class would be implemented or overridden in dog and cat classes different. public void speak ( ) { System.out.print("woof woof!"); } "meow meow!" in the cat class...
21st Jun 2018, 4:42 PM
Minnie Mouse
Minnie Mouse - avatar
+ 4
check if this helps class getParentname { public String fname="Chris" ; public String sname="Parker"; } class child1 extends getParentname { String child="Rick"; void display() { System.out.println("What is child's full name?"); System.out.println(child+" "+fname+" "+sname); } public static void main(String[]args) { child1 c1=new child1(); c1.display(); } }
22nd Jun 2018, 2:42 PM
Aditya
+ 4
PRIYA D you are welcome...
22nd Jun 2018, 6:09 PM
Saurabh Tiwari
Saurabh Tiwari - avatar
+ 3
Cool! Saurabh, The link you posted is so helpful for practicing programs. I was in search of such kind of website and now I found out .. Thanks :)
22nd Jun 2018, 5:22 PM
PRIYA D
PRIYA D - avatar
+ 3
Saurabh Tiwari Read what PRIYA D has to say :)
22nd Jun 2018, 5:24 PM
Abhishek Tandon
Abhishek Tandon - avatar