Java Data Types

Java Data Types In Hindi – Primitive And Non-Primitive Data Types

Java

Java Data Types In HindiPrimitive And Non-Primitive Data Types – Java Programming Me 2 Types Ke Data types Hote Hai. In Dono Data Types Ko Niche Explain Kiya Gaya Hain |

Also Read – Java Variables

Java Data Types In Hindi

Java Mai 2 Types Ke Data Type Hote Hain. Pahla Primitive Data Types And Non-Primitive Data Types Hote Hai. inko ham ek ek example ke sath Understand Karte Hai.

Jab Bhi Aap Kisi Value Ko Store Karne Ke Liye Variable Create Karte Hai To Aap Sath Hi Us Variable ka Data type Bhi Define Karte Hai | Data Type Se Compiler Ko Ye Pta Chalta Hai Ki Is Variable Mei Kis Type Ka Data Store Kiya Jayega |

Java Supports 2 Classes of Data Types

  1. Primitive Data Types – Ye Wo data types Hote Hai Jo Jyadatar Sabhi programming languages Mai Paye Jate Hai।  
  2. Non-Primitive Data Types – Java Aapko data type create Karne Ki capabilities provide Karti Hai ।  

Aap Upper Diye Gaye Image Mai Defference Dekh Sakte Hai |

Primitive Data Types In Java In Hindi

Primitive Datatypes me 4 Data type Aate Hai Inhe Ham Ek List Se Understand Karte Hai. Niche Diye Gaye Column Me Data Types And Size ( In Bytes ) Or Sign Bataya Hai |

Data Type Size (In Bytes)Used For Sign
Integer2%d
Character  1%c
Float%f 
String%s

Aap Upper Diye Gaye Example Ko Understand Kar Sakte Hai |

Integer Data Types, Storage Size and Range

Integer category Ke data types whole number Ko store Karne Ke Liye Istemal Kiye Jate Hai |

Data TypeSizeDescription
byte1 byteStores whole numbers from -128 to 127
short2 bytesStores whole numbers from -32,768 to 32,767
int4 bytesStores whole numbers from -2,147,483,648 to 2,147,483,647
long8 bytesStores whole numbers from -9,223,372,036,854,775,808 to 9,223,372,036,854,775,807
float4 bytesStores fractional numbers. Sufficient for storing 6 to 7 decimal digits
double8 bytesStores fractional numbers. Sufficient for storing 15 decimal digits
boolean1 bitStores true or false values
char2 bytesStores a single character/letter or ASCII values

In Data types, Ko Inki size Or range Ke base Par differentiate Kiya Gya Hai । Aap Inhe Jarurat Ke Hisab Koi Bhi data type Istemal Kar Sakte Hai । Niche Diya Gya Example Ko Dekh Sakte Hai|

Also Read – Java Comments

Example:

 int balance = 650000; 

Floating Point Data Types, Storage Size and Range

Floating-point data types Aese Number Ko store Karne Ke Liye Istemal Hota Hai. Jinme Point Hota Ho |

Data TypeSize (In bytes) Range 
float3.4E-38 to 3.4E+38 
double81.7E-308 to 1.7E+308
long double10 3.4E-4932 to 1.1E+4932 

Upper Diye Gye Data types Ko Inki size Or range Ke base Par Istemal Kar Sakte Hai । Aap Inhe Jarurat Ke Hisab Koi Bhi data type Istemal Kar Sakte Hai । Niche Diya Gya Example Ko Dekh Sakte Hai|

Example:

float PI = 3.14f;

Character Data Types

Kisi Number Ke Alawa Yadi Aap Kisi Character Ko Store Karna Chahte Hai | To Aap Iske Liye Character Data Types Ka Istemal Kar Sakte Hai |

Example:

char myGrade = 'B';

String Data Types

String ek data type hota hai Collection of Character String me us time istemal karte hai jahah pr Hame ek se jyada character use karne padte hai.

Waise Dekha Jaye to String Ek Non-primitive Data Type Hota Hain |

Example:

String name = "Danish";

Boolean Data Types

Boolean Data Type Keval Variable Ko True Or False Value Declare Karne Ke Liye Hota Hain |

Example:

boolean isJavaFun = true;
boolean isFishTasty = false;
System.out.println(isJavaFun);     // Outputs true
System.out.println(isFishTasty);   // Outputs false

Non-Primitive Data Types in Java In Hindi

Non-primitive Data types Wo Data Type Hote Hai Jo Koi New Data Type Create Nhi Kar Sakte Hai |

  • Arrays
  • String

Aap Upper Dekh Sakte hai Non-primitive Data Types Me 2 Data Types Hote Hai| inhe Ham Jab Istemal Karte Hai Jab Hame Thora Advance Program Create Karna Hota Hai | Inke Example Ham Aage ki Post Me Dekhenge Kyoki Aapko Understand Karne Mei Thori Dikkat Hogi |

Friends Mujhe Umeed Hai Ki Aapko Data Types in Hindi Ke Bare Mai 100% Jankari Ho Gayi Hogi | Agar Aapko Learn Karne Main Dikkat Aa Rahi Hai To Aap Mere Se Contact Kar Sakte Hai |

Yadi Aapne  HTML Full Course  And CSS Full Course And Python Full Course And PHP Full Course Nhi Read Kiya Hai To Aap Vah Bhi Read Kar Sakte Hai |

Leave a Reply

Your email address will not be published. Required fields are marked *