+ 2

What is the difference between extending ( inheriting) a class and importing a class from package

28th Jul 2020, 5:34 AM
Ayush Pandey
Ayush Pandey - avatar
3 Respostas
+ 3
Extending a class is creating a new class that is a subclass of some other class. This will allow you to add or change functionality of the class you are extending. Import doesn't change your program, it just allows you to write the short form of declaring a class. https://stackoverflow.com/questions/3468252/whats-the-difference-between-importing-and-extending-a-class#:~:text=Extending%20a%20class%20is%20creating,the%20class%20you%20are%20extending.&text=Import%20doesn't%20change%20your,form%20of%20declaring%20a%20class.
28th Jul 2020, 5:46 AM
Mantafounis Panagiotis
Mantafounis Panagiotis - avatar
0
Danijel Ivanović may u explain
28th Jul 2020, 5:45 AM
Ayush Pandey
Ayush Pandey - avatar
0
Thank you!
28th Jul 2020, 5:47 AM
Ayush Pandey
Ayush Pandey - avatar