Understanding Variable and Primitive Data Type
In this class, We discuss Understanding Variable and Primitive Data Type.
The reader should have basic knowledge of program execution and memory. Click Here.
In our last class, we discussed our java program execution.
During the execution, if the processor needs data, it will get it from the random access memory.
The question here is what type of data is needed for the program?
Different types of data are needed for the program execution.
So we need to inform the compiler of the data type needed to be stored.
Using some keywords in the java language, we inform the compiler of the data type needed.
List of primitive data types in java:
1) Byte
2) Short
3) int
4) long
5) float
6) double
7) char
8) boolean
Variable:
A variable is a container to hold data.
Variable decleration:
int a;
The above line execution creates a space in Random access memory.
The below diagram shows the memory allocation and symbol table to identify the variable.
The symbol table stores the list of variables and their memory locations.
Why a symbol table?
Take the next line of code a=20;
The next line assigns value to the variable.
The compiler will check the symbol table and find the memory location allocated to the variable a to assign a value.
First, declare a variable, then assign a value to that variable.
Without declaring a variable, we can not assign a value.
Declaring a variable will provide memory space for that variable.
Link for playlists:
/ @wisdomerscse
Link for our website: https://learningmonkey.in
Follow us on Facebook @ / learningmonkey
Follow us on Instagram @ / learningmonkey1
Follow us on Twitter @ / _learningmonkey
Mail us @ learningmonkey01@gmail.com
Sur cette page du site, vous pouvez voir la vidéo en ligne Understanding Variable and Primitive Data Type || Lesson 3 || Java Programming || Learning Monkey || durée heure minute seconde en bonne qualité , qui a été Téléchargé par l'utilisateur Wisdomers - Computer Science and Engineering 28 mars 2023, Partagez le lien avec vos amis et connaissances, sur youtube cette vidéo a déjà été regardée 588 fois et il a aimé 13 téléspectateurs. Bon visionnage!