ycliper

Популярное

Музыка Кино и Анимация Автомобили Животные Спорт Путешествия Игры Юмор

Интересные видео

2025 Сериалы Трейлеры Новости Как сделать Видеоуроки Diy своими руками

Топ запросов

смотреть а4 schoolboy runaway турецкий сериал смотреть мультфильмы эдисон
Скачать

datatypes and variables in java in Hindi

java by tarun sir

How to get input from user in Java

What are datatypes in Java?

How many datatypes do we have in Java?

Java Data Types

Data types in Java

Java Data Types (Primitive)

Data Types in Java | Primitive and Non-Primitive Data Types

Java - Basic Datatypes

primary datatypes in java

range of data types in java

different data types in java

Автор: Tarun Sir

Загружено: 2022-06-30

Просмотров: 412

Описание: In this video you will learn that what is variable and datatype in java.

Variables and Datatype in Java

Variable
A variable is a name given to the memory location.
A variable is used to store value.
We can change the value of variable when needed.
Every variable in java program must be declared before it is used.
To create every variable(declare) we use datatype.

Datatype
The datatypes are keywords which are used to declare the variables.
The datatype decides the type of value that can be stored in the variable.
The datatype decides what is the size of the memory location which is used as variable/ by variable.
The datatype also decides the range of the values that can be stored in the variable.
The syntax for creating variable is as follows:
datatype variable_name=value;

The following table shows all 8 primary datatypes available in java:
Datatype Type of value Size Range
byte Integer 1 byte -128 to 127
short Integer 2 byte -32768 to 32767
int Integer 4 byte -2147483648 to 2147483648
long Integer 8 byte -263 to 263-1
float Real 4 byte 32-bit IEEE 754
double Real 8 byte 64-bit IEEE 754
boolean Boolean (true/false) 1 bit true,false
char Character 2 byte 0 to 65535


The following example creates a variable of int type and store 100 into it.
int a=100;
System.out.println(a);
In java, if you try to store a value beyond the permitted range of datatype then its syntax error.
The following declaration gives syntax error.
byte b=130;

www.tarunsir.com
www.cinstitute.org.in

Connect me on linkedin
  / tarrunverrma  

Connect me on instagram
  / the_ultimate_coding_stuff  

Follow me on twitter
  / tarrunverrma  

Join my telegram channel
t.me/tarunvermasir

#tarunsir #javatutorial #learnprogramming #coding #java #datatype

Не удается загрузить Youtube-плеер. Проверьте блокировку Youtube в вашей сети.
Повторяем попытку...
datatypes and variables in java in Hindi

Поделиться в:

Доступные форматы для скачивания:

Скачать видео

  • Информация по загрузке:

Скачать аудио

Похожие видео

© 2025 ycliper. Все права защищены.



  • Контакты
  • О нас
  • Политика конфиденциальности



Контакты для правообладателей: [email protected]