+ 1
Is there any way to link 2 classes of java together ?if yes them how.
java
2 Answers
+ 2
Inheritance between the two, then they share attributes, objects, and functions, etc.
+ 1
but how can we link the 2 with each other . is: if a line is to be printed on the main class but the data for the line is to be taken from the sub-classes