Primitive data types are the direct and basic data types. But non primitive are the data types which internally again use the primitive data types. For eg: if you want to create an array or arraylist or hashmap, then u need to mention the type of data it stores. Like int[] or Arraylist In non primitive you can even store the objects of class but that can't be done in primitive data types.
As mentioned, the primitive datatypes are already defined in the java programming language. for eg: int i = 5; byte b = 2; char c = 'a'; so all of these dayatypes are defined to store particular type of data. int is used to store a numeric data only, char is used to store character type of data. but in the non primitive, its programmer's choice. lets take array as an example. you can create different type of arrays ryt? like int[] or byte[] or char[] that means arrays are allowing the programmer to choose what kind of data he wants to store. the same goes with collections as well, programmer can define what kind of data he wants to store. But the primitive datatypes are not allowing the user to decide the data ryt? in int datatype u need store only integer type of data. and also u can create userdefined datatypes in non primitive datatypes, those are classes. in simple words, primitive datatypes are like hostels (you can't do anything as per your wish, you have to follow the hostel guidelines only) but the non primitive datatypes are like bachelors room (you can do anything as per your wish, no one is stopping you)
Hi Vijay, That's a lot of things you asked for. I will surely make those things but it will take some time. Untill then, Hope you enjoy the videos which were already created.
↔ Java for Absolute Beginners Playlist Link: bit.ly/3keRJGa
✴ Checkout my other playlists: bit.ly/3gLIAVL
☕ Buy me a coffee: bit.ly/33ljBWc
Hello sir, why are we using plus sign in print statement before the variable
It is called concatenation buddy.
When we are appending text with any other datatype value then we need to use concatenation symbol
Can u plzz tell that how we can take size bcoz u are using /8,/4
You can use the wrapper classes for finding the size buddy
What is meant by primitive and non primitive data types?
Primitive data types are the direct and basic data types.
But non primitive are the data types which internally again use the primitive data types.
For eg: if you want to create an array or arraylist or hashmap, then u need to mention the type of data it stores.
Like int[] or Arraylist
In non primitive you can even store the objects of class but that can't be done in primitive data types.
@@HYRTutorials still I am in confusion. if possible could u please provide some more information. Thank u
As mentioned, the primitive datatypes are already defined in the java programming language.
for eg:
int i = 5;
byte b = 2;
char c = 'a';
so all of these dayatypes are defined to store particular type of data.
int is used to store a numeric data only, char is used to store character type of data.
but in the non primitive, its programmer's choice.
lets take array as an example.
you can create different type of arrays ryt?
like int[] or byte[] or char[]
that means arrays are allowing the programmer to choose what kind of data he wants to store.
the same goes with collections as well, programmer can define what kind of data he wants to store.
But the primitive datatypes are not allowing the user to decide the data ryt?
in int datatype u need store only integer type of data.
and also u can create userdefined datatypes in non primitive datatypes, those are classes.
in simple words, primitive datatypes are like hostels (you can't do anything as per your wish, you have to follow the hostel guidelines only)
but the non primitive datatypes are like bachelors room (you can do anything as per your wish, no one is stopping you)
@@HYRTutorials Thank u
Can you please create videos on git GitHub maven jenkins cucumber docker AWS testng api automation testing and appium
Hi Vijay,
That's a lot of things you asked for.
I will surely make those things but it will take some time.
Untill then, Hope you enjoy the videos which were already created.
@@HYRTutorials thanks