开发者

Every java program is Object Oriented

Our Java instructor always asks us to 开发者_如何学JAVAprove that "Every java program is Object Oriented"

How would I go about proving this is true?


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.out is 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.


See here.This defines the reason why Java is object oriented programming language.

  • Is Java 100% object oriented?


Every java program is not Object oriented due to the presence of primitives and statics.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜