what will happen if my subclass and the parent class use the same variable name?
the parent class is sorta like this:
public class things{
private things[] stuff;
}
and the subclass is something like this:
import java.utils.LinkedList;
public class listOfThings extends LinkedList<things>{
private LinkedList<things> stuff;
}
is this allowed? or will the linked list override the array?
You’re not extending things with this example, you are extending
This is fundamentally different than extending things.
Therefore, as is, your code should compile.