
🚀 Day 3 of My Automation Journey – Data Types, Memory & Variables in Java
On Day 3, we went deeper into: JRE inside JVM JVM and OS independence Data Types Memory concepts (Stack) Variables & memory allocation This was a very important foundation day. 🔁 JVM and OS Independence We learned that: JVM makes Java platform independent Java programs can run on Windows, Linux, or Mac Only JVM needs to be installed for that OS That’s why Java is called: “Write Once, Run Anywhere” 📦** What is a Data Type?** A Data Type defines: What kind of value can be stored How much memory it uses Examples of values: Numeric values (10, 100) Decimal values (10.5, 20.75) Special characters ('A', '@') True/False Think of a data type as a container. You must choose the correct container for the value you store. 🧩 Two Types of Data Types in Java 1️⃣ Primitive Data Types These store simple values directly. Data Type Size Example byte 1 byte 50 short 2 bytes 1000 int 4 bytes 100000 long 8 bytes 100000000L float 4 bytes 10.5f double 8 bytes 10.5678 char 2 bytes 'A' boolean 1 bit (logical)
Continue reading on Dev.to Beginners
Opens in a new tab

