Lesson 16 of 34
ArrayList: வளரும் பட்டியல்ArrayList: A List That Grows
9 min 30 XP
Array-ன் அளவு நிலையானது. எத்தனை உறுப்புகள் வரும் என்று தெரியாதபோது ArrayList பயன்படுத்துங்கள், அது தானாக வளரும். int-க்கு பதிலாக Integer, double-க்கு பதிலாக Double எழுத வேண்டும்.
An array has a fixed size. When you don't know how many items you'll have, use an ArrayList, which grows by itself. Write Integer instead of int and Double instead of double inside the < >.
Example: edit me and press Run
Press Run to see the result here.Example: edit me and press Run
Press Run to see the result here.Array: arr.length (bracket இல்லை). String: s.length(). ArrayList: list.size(). Interview-ல் இந்த மூன்றையும் குழப்ப வேண்டாம்!
Array: arr.length (no brackets). String: s.length(). ArrayList: list.size(). Don't mix these three up in an interview!