answersLogoWhite

0

A Java class is expected to have all functions defined. The purpose of defining the methods is to decide on its expected functionality and behavior.

Only in case of Interfaces we declare methods but leave the method definitions to the implementing classes.

User Avatar

Wiki User

16y ago

Still curious? Ask our experts.

Chat with our AI personalities

JordanJordan
Looking for a career mentor? I've seen my fair share of shake-ups.
Chat with Jordan
ReneRene
Change my mind. I dare you.
Chat with Rene
RafaRafa
There's no fun in playing it safe. Why not try something a little unhinged?
Chat with Rafa

Add your answer:

Earn +20 pts
Q: Why all methods should be written in classes in java?
Write your answer...
Submit
Still have questions?
magnify glass
imp