Understanding Variable and Primitive Data Type || Lesson 3 || Java Programming || Learning Monkey ||

Publicado el: 28 marzo 2023
en el canal de: Wisdomers - Computer Science and Engineering
588
13

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


En esta página del sitio puede ver el video en línea Understanding Variable and Primitive Data Type || Lesson 3 || Java Programming || Learning Monkey || de Duración hora minuto segunda en buena calidad , que subió el usuario Wisdomers - Computer Science and Engineering 28 marzo 2023, comparta el enlace con amigos y conocidos, en youtube este video ya ha sido visto 588 veces y le gustó 13 a los espectadores. Disfruta viendo!