Posts

Showing posts with the label java with examples

Data types in Java जावा में डेटा के प्रकार

In Java, data types are used to specify the kind of data a variable can store. Understanding data types is fundamental to writing error-free and efficient code. जावा में, डेटा प्रकार यह निर्धारित करते हैं कि कोई वेरिएबल किस प्रकार का डेटा संग्रहीत कर सकता है। प्रभावी प्रोग्रामिंग के लिए डेटा प्रकारों की समझ आवश्यक है। 1️⃣ Primitive Data Types आदिम डेटा प्रकार Primitive data types store simple and direct values. Java supports 8 primitive data types: आदिम डेटा प्रकार सीधे और सरल मान संग्रहीत करते हैं। जावा में 8 प्रकार के प्रिमिटिव डेटा टाइप होते हैं: Data Type Size Range / Description डेटा प्रकार आकार सीमा / विवरण byte 8-bit  -128 to 127 बाइट 8-बिट -128 से 127 short 16-bit   -32,768 to 32,767 शॉर्ट 16-बिट -32,768 से 32,767 int 32-bit  -2,147,483,648 to 2,147,483,647 इंट 32-बिट -2,14,74,83,648 से 2,14,74,83,647 long 64-bit  Very large integer values लॉन्ग 64-बिट बहुत बड़े पूर्णांक मान float 32-bit   ...