0
Can a java program have only one class ??
As I saw this image :- https://www.dropbox.com/s/rsz10uvyymtt4n0/IMG_20170625_105601.jpg?dl=0 Please tell if we can have more than one class
1 Answer
+ 11
Oh certainly not! The best way to plan out a Java program is to think in terms of how multiple objects will interact in order to do the work you need done!
That's not too say you can't cram a whole program into a single class, but that defeats the purpose of OOP. I wouldn't recommend it.