Answer Posted / rizwan
If you want to reuse the code of one class then your new
class shuld 'extend' the older one.so that you will have
all the code present of the older class oin the new one.
The older is called a parent/super class.
the newer one is called child/sub class.
| Is This Answer Correct ? | 35 Yes | 7 No |
Post New Answer View All Answers
Is main is a keyword?
What is the difference between an if statement and a switch statement?
Can we define private and protected modifiers for variables in interfaces?
What is callable java?
What is command line used for?
What is a pointer and does java support pointers?
How can you add and remove nodes in jtree?
Is java an ide?
Difference between linkedlist and arraylist.
Can the garbage collection be forced by any means?
What is a method type?
Is java util list serializable?
What about main() method in java ?
Why is the main method declared static?
Define how destructors are defined in java?