Our Java instructor always asks us to prove that “Every java program is Object Oriented”
How would I go about proving this is true?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Because you cannot have a main that isn’t part of a class. Hence a class must exist in order to have a valid program.
But that’s really nit-picking since you don’t actually have to instantiate that class to do something. You can write a complete program with just static methods that instantiate no objects at all.
Whether it’s a useful program without using objects like
System.outis another matter.Some OO purists will argue that Java isn’t pure OO and they’re probably right (in my opinion). That doesn’t make it any less useful.