+ 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 :)
14 odpowiedzi
+ 13
https://www.codesdope.com/practice/
this site has some good problems on almost every concept..
you can learn about the concept as well...
+ 22
Infinity 👍
I'll set up a link for the book about the OOP
If you can, you read it, it helped me! 😉
+ 21
Infinity
Try to download,
Please let me know if everything is ok! 👍
https://www.sololearn.com/post/10497/?ref=app
https://www.sololearn.com/post/11155/?ref=app
+ 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
}
}
+ 7
whoa!! 11xps after a long time
thnx bro!!😉
and you are welcome 😄
+ 5
code a program to represent a family that's all😉
+ 5
Saurabh Tiwari Thank you so much bro!!
+ 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........
+ 4
Danijel Ivanović Thank you so much 😊
+ 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...
+ 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();
}
}
+ 4
PRIYA D you are welcome...
+ 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 :)
+ 3
Saurabh Tiwari Read what PRIYA D has to say :)