Data types in Java for Beginners| What is Data Types | Basic Java Programming | Hindi

Опубликовано: 06 Январь 2024
на канале: Java Programming
37
11

Data Types And Variable
What are Java data types, and how are they grouped?
In Java, a variable must be a specified data type such as an integer, floating-point number, character Boolean, or string.
The two groups of data types are:
Primitive data types
which include byte, short, int, long, float, double, Boolean, and char
Non-primitive data types,
which include string, arrays, and classes
How do you define primitive data types and describe each by size and description?
byte is 1 byte in size.
It stores whole numbers from -128 to 127

short is 2 bytes in size.
It stores whole numbers from -32,768 to 32,767

int is 4 bytes in size.
It stores whole numbers from -2,147,483,648 to 2,147,483,647

long is 8 bytes in size.
It stores whole numbers from -9,223,372,036,854,775,808 to 9,223,372,036,854,775,807

float is 4 bytes in size
It stores fractional numbers and is sufficient for storing 6 to 7 decimal digits.
Float Salary = 15000.00f

Double is 8 byte in Size
It stores fractional numbers and is sufficient for storing 15 decimal digits.

Boolean is 1 bit in size.
It stores true or false values.

char is 2 bytes in size.

   • Best Debugging Tips  Beginners | How ...  
   • How to Print Pattern In Java | Full P...  
   • How to Print Pattern In Java | Full P...  
   • Break and Continue || Break || Contin...  
   • Do While Loop || Loop || Java  
   • For Loop || Loop || Java  
   • How to Print Fibonacci Series || Fibo...  
   • How Printing  Solid Square Pattern  i...  


На этой странице сайта вы можете посмотреть видео онлайн Data types in Java for Beginners| What is Data Types | Basic Java Programming | Hindi длительностью часов минут секунд в хорошем качестве, которое загрузил пользователь Java Programming 06 Январь 2024, поделитесь ссылкой с друзьями и знакомыми, на youtube это видео уже посмотрели 37 раз и оно понравилось 11 зрителям. Приятного просмотра!