
π Day 29 of My Automation Journey β Arrays (Full Guide + Tricky Questions)
Todayβs learning was one of the most important milestones in my journey π₯ π Arrays (core concept) π JVM internal behaviour π Memory understanding π Tricky interview questions π Deep dive into public static void main This is where coding becomes real engineering π πΉ PART A β ARRAYS COMPLETE THEORY πΉ 1. What is an Array? π An array is an object π It is a container that: β Stores multiple values β Same data type β Fixed size πΉ 2. What Happens Internally (JVM π₯) int [] arr = { 10 , 20 , 30 }; π Internally JVM converts: int [] arr = new int []{ 10 , 20 , 30 }; π‘ JVM: Creates object in Heap memory Stores reference in variable πΉ 3. Proof β Array is an Object System . out . println ( arr . getClass ()); Output: class [ I πΉ 4. Array Creation int [] arr1 = { 10 , 20 , 60 , 30 }; int [] arr2 = new int [ 5 ]; πΉ 5. Important Points β οΈ β Fixed size β Index starts from 0 β Stored in Heap β Default values assigned πΉ 6. Default Values Type Default int 0 boolean false object null πΉ 7. Initialization & A
Continue reading on Dev.to
Opens in a new tab



