What does the reversed() method do? #javalanguage #javacoding #javatips #javacodinginterview #coding

preview_player
Показать описание
Cracking the #Java #Coding #Interview - Question 248: What does the reversed() method do?
Рекомендации по теме
Комментарии
Автор

I remember a bug caused by at least one of the list items being null (which was probably a bug in itself).

andreastasoulas
Автор

There could be meaningful null values in a collection that is the result of a JDBC query.

sjzara
Автор

J'adore Les videos. Ça m'a vraiment aidé quand je prennais mon cours sur Advanced Java

ginoedgarngomeni
Автор

yea i hear you LOL but null values in collection generaly mean there was no input validation somewhere along the line, so id guess thats why they are allowed and thats the reason they appear. If they didnt appear then the app or view would crash every time something wasnt checked or there was no valid default supplied in transaction, or need to rool back entire transaction due to one non necissary unsuplied non checked input, hmm besides i like lists they are calming haha

jonsmith
Автор

Hahaha... sorry for the nulls in collections Señor Mr Don Java 😊

TheVainDog
Автор

Was ist the difference between a view and a copy of the list?

ArkenGAMES
Автор

why? for a collection of nulls and headaches. 😂

rollinOnCode
Автор

Hahahaha.. this will surely stick, Sir... no nulls pls in List.copyOf()

ikennaokoro
Автор

It always amuses me how Java heads celebrate its abject crapness. Kotlin has such a rich set of functions over its collections that would make any Javahead blush.

bartdart
Автор

More importantly, List.copyOf returns an unmodifiable List. If you want a modifiable copy you'll need to create it with e.g. new ArrayList<>(myList).

jay_
visit shbcf.ru