Is Java 100% Object Oriented Programming Language ? | Java Interview shorts 25 #javainterview

preview_player
Показать описание
Is Java 100% Object Oriented Programming Language ? It's a big no. Java supports most of the oop principles like inheritance , abstraction, encapsulation, polymorphism etc but what it doesn't follow is this, all predefined and user defined objets should be objects.

Java supports primitive types like byte,int,short,double,boolean etc which are not objects.

java also support static members and static variables which are not part of an object.

so everything is not objects in java . Java is not 100% object oriented ,it's 99% ; I would say.

It's a popular java interview question which all java developer should aware of.
Рекомендации по теме
Комментарии
Автор

**Auto-boxing**: Integer objectInt = primitiveInt; (Java automatically converts)
-**Using valueOf() method**: Integer objectInt = (Preferred way)
**Using wrapper class constructors**: new Integer(primitiveInt); (Not recommended after Java 9)

venkatadri
Автор

In Java, you can convert primitive types to their corresponding wrapper object types using autoboxing. Autoboxing is a feature introduced in Java 5 that automatically converts primitive types to their corresponding wrapper classes.

int primitiveInt = 10;
Integer wrapperInt = primitiveInt; // Autoboxing

it....
Автор

Java may not be 100% object-oriented, but 100% object oriented can be achieved in Java😊

hnaveediqbal
Автор

Yes using the Wrapper class we can convert primitive types to objects.

neerajslab
Автор

Using wrapper classes we can converted into primitive type to object type.

gangireddychandrahasreddy
Автор

You have any videos on advanced JVM topics? For example hidden spaces in memory.

Karthickபரையர்
Автор

Using Wrapper classes or objects we can convert primitive types to respect objects. And these wrapper classes are immutable like String.

kirankiransai
Автор

Through a boxing through a wrapper class we can can covert premitive to Object

ketantalele
Автор

Java doesnt support multiple inheritance.

nareshdhami
Автор

Using wrapper classes we can converted into primitive type to object type.

gangireddychandrahasreddy
Автор

Using wrapper classes we can converted into primitive type to object type.

gangireddychandrahasreddy
Автор

Using wrapper classes we can converted into primitive type to object type.

gangireddychandrahasreddy
Автор

Using wrapper classes we can converted into primitive type to object type.

gangireddychandrahasreddy