comp129 / comp55

Teacher repository for the educational materials for COMP 55
Other
0 stars 5 forks source link

Lists.md: Enhance Explanation of ArrayList Limitations with Primitive Types #105

Closed Abdullah0x0 closed 6 months ago

Abdullah0x0 commented 6 months ago

The current section on ArrayList limitations with primitive types (e.g., int, double) could be enhanced for better clarity and understanding. The original text states:

The other drawback is that they don't work directly with primitives like int and double. To use primitives as lists it is a little bit more cumbersome. To create an ArrayList of ints, we have to use an object type called Integer. After doing so, Java will then take the integers and magically box them into Integer objects that simply contain the number.

While this provides a basic overview, it lacks a detailed explanation that could help readers understand the underlying concepts more thoroughly and could confuse beginners. A revised version could include:

This fix would clarify a potentially confusing topic for beginners and also add to the document's educational value by offering a more comprehensive understanding of how Java collections work with primitive types.

onzfonz commented 6 months ago

This is fine and you can start working on this.

However, we will not reference SEO content (geeksforgeeks is one of these SEO style sites), so you'll need to find something that is more official on the topic (or at least something that is not purely devoted to serving ads)