java is completely oops language

skp819's Avatar
Contributor
Can anybody tell me that java is completely oops language. If yes can you tell me the reason?
xpi0t0s's Avatar, Join Date: Aug 2004
Mentor
Depends what you mean by "completely oops". If by that you mean that it doesn't support scalar values at all, in other words that absolutely everything must be an object, then no it isn't because as in C you can define, say, int x and x is not an object. However Java does support the object oriented paradigm in that you can define objects and the compiler will throw errors if you write code that breaks the OO rules, e.g. if a non-member function attempts to access a private atrtribute.