How does a ArrayList react when one of the elements of a pair is entered as a null value?
My intent is to create a list for courses and the marks for those courses, but I’m wondering what happens if we don’t enter a score for a course. Would that throw an exception or just leave a null value at that element position?
Lists don’t have “pairs” – I think you mean
Map, notList. Lists have single values, maps have pairs.Maps can have null values for a given key.