What is the correct declaration for an abstract method 'add' in a class that is accessible to any class, takes no arguments and returns nothing?
beter say in an abstract class and not just class
feedback on question
Moderator: admin
-
raphaelzintec
- Posts: 167
- Joined: Sun Apr 21, 2024 10:43 am
- Contact:
-
gemmalyly
- Posts: 3
- Joined: Wed Oct 01, 2025 2:37 am
- Contact:
Re: feedback on question
I think the clarification is important—I would declare it in an abstract class as public abstract void add(); so it’s accessible everywhere, takes no arguments, and returns nothing. I like how precise wording matters here, because a small detail can change the whole meaning. Veck IO