G
Guest
hi all,
i am creating a subclass of File that also implements
javax.swing.tree.TreeNode. TreeNode specifies a getParent() method that
returns a TreeNode. however, the File class also has a getParent() method,
which returns a String. When i try to compile, the compiler complains that
my method getParent() cannot override the getParent() method of the File
class because the return type is wrong!
this is a tricky one. any ideas on how i can create a class that is a
subclass of File and still implements the TreeNode interface?
c
i am creating a subclass of File that also implements
javax.swing.tree.TreeNode. TreeNode specifies a getParent() method that
returns a TreeNode. however, the File class also has a getParent() method,
which returns a String. When i try to compile, the compiler complains that
my method getParent() cannot override the getParent() method of the File
class because the return type is wrong!
this is a tricky one. any ideas on how i can create a class that is a
subclass of File and still implements the TreeNode interface?
c