What is the difference between Primitive & Non-Primitive Data types in Java?
Watch the answer for this Selenium Interview Question in a detailed manner in the below youtube video:
Note: Don’t forget to subscribe to my Youtube channel here: Click here
Notes used for explanation in this Youtube video are provided after the video:
Notes used in the above Youtube Video:
There are two types of data types in Java:
- > Primitive Data Types
- > Non-Primitive Data Types
Primitive Data Types:
- > Predefined or default data types in Java are known as Primitive data types
- > Objects can’t be created for primitive data types directly
- > We have to use wrapper class for converting primitive data types to object-oriented form
- > The following are the different primitive data types in Java:
- – int
- – short
- – byte
- – long
- – float
- – double
- – boolean
- – char
Non-Primitive Data Types:
- > Objects can be created for non-primitive data types
- > Examples for Non-Primitive data types are:
- – String
- – Array
- – ArrayList
- – User-defined classes like Car, Dog, etc.
- > For more Selenium Interview Questions and answers, continue to the next post (Click on Next Post link below)
- > Check complete Selenium Interview Questions list here (Click here)
Please leave your questions/comments/feedback below.
Happy Learning ?
On a mission to contribute to the Software Testing Community in all possible ways.