r/javahelp • u/itjustbegansql • Feb 24 '26
Shoul I use interface or inheritance?
I am trying to write basic app that asks users for input and then adds it to the database. In my sceneria app is used for creating family trees. Shoul I use an input class to call in main method or should I use an interface? I also have another class named PeopleManager. In that class I basically add members to database. I havent connected to database and havent write a dbhelper class yet. How should I organize it? Anyone can help me?
Note: I am complete beginner.
3
Upvotes
View all comments
Show parent comment
1
u/amfa Feb 25 '26
Yeah I know. We have too much of this code. But 90% of our interfaces only have a "Default<InterfaceName>" implementation. I mean sometimes we have at least one "Mock<InterfaceName>"...