CodeGym /Java Course /Module 1. Java Syntax /Additional lessons for Level

Additional lessons for Level

Module 1. Java Syntax
Level 16 , Lesson 7
Available

You already know a lot about primitive types, and in this level you got acquainted with their doppelgangers — the wrapper classes, and learned what autoboxing and unboxing are, how to compare wrapper types correctly, and how to do it incorrectly.

You also took your array experience to the next level by getting to know the ArrayList class. Basically, you've got stuff to think about! Better yet, set aside half an hour for a few additional articles on these topics that will put everything in its place.

Wrapper Classes in Java

The wrapper classes look and behave like the primitive type of the same name, but they are in fact real classes. This article expounds on who needs them, what they are for, and what you do with them.

Autoboxing and Unboxing in Java

In Java, a feature of primitives and their wrappers is autoboxing / unboxing. Let's dig into this concept.

ArrayList class

Arrays are great, but programmers get into a bad mood due to their limited size and the inability to add or remove new elements. So, meet ArrayList: it's a souped-up array, a simple and convenient data structure. Once you have moved from arrays to ArrayList, you just can't go back.

Deleting an element from an ArrayList

And here is another article that continues our discussion of ArrayList. This time we will dwell in more detail on important operations for working with lists — removing an item from a list, and removing an item from a list in a loop.

ArrayList in pictures

If you don't fully understand how ArrayList works, this lesson is for you. There will be a lot of pictures and explanations and almost no code. But most importantly, after reading and understanding it, you will understand very well how ArrayList works... Who knows, maybe you'll even implement your own after that! So, to advance your training, this is a good task for a beginning developer.

Comments (12)
TO VIEW ALL COMMENTS OR TO MAKE A COMMENT,
GO TO FULL VERSION
Parsa Level 62, Bangalore, India Expert
28 November 2023
No mention of multidimensional ArrayLists?
b n raju Level 17, irving, United States
15 June 2023
need to know answers as well
Fadhil Radhian Level 18, Semarang, Indonesia
25 March 2023
needs to show the correct answer or option to retry
BoomShockPow Level 14, Norristown, United States
9 February 2023
Would love to know WHY I got these wrong.. Can't even retry the questions SMH
Hiyo Level 24
25 January 2023
Some Tips for the tricky ones 1. ArrayList objects can always modify its contents even if it's marked as final. 2. To insert, you just need to know the position and the "value" you want to insert. 3. To remove, you just need to know what "value" you want to remove. 4. ArrayList is part of List which is part of Java's Collection library and they use "size()" method, not length. Think of "length" for constant immutable like "array", "String" etc.
Rene Level 28, Netherlands
21 February 2024
The 'remove' question was a little confusing. I cannot redo it but i think it asked for removal of a value from the MIDDLE of the array.
Tasmoda Level 28, Midrand, South Africa
13 May 2022
It would also be nice to have a retry at the questions I got wrong at the end of the quiz.
matemate123 Level 50, Kraków, Poland
16 November 2022
Exactly, at least may be learn what was wrong and why.
Parsa Level 62, Bangalore, India Expert
28 November 2023
You can refresh the screen and retake the test.
Abhishek Tripathi Level 72, Rewa, India Expert
28 December 2023
I don't know you, but I have come across a lot of your comments on solving other's problem. You seem to be a gd guy keep it up 👍.@Parsa
Parsa Level 62, Bangalore, India Expert
28 December 2023
Kind of you to say. Thanks. :)
Spydrow Level 14, Germany, Germany
29 April 2022
It would be really nice to get the correct answers at the end, not just what question we did wrong.