Feuermagier / autograder

Automatic grading of student's Java code
MIT License
13 stars 7 forks source link

Suggest replacing `list.get(0)` with `list.getFirst()` and `list.get(list.size() - 1)` with `list.getLast()` #541

Open Luro02 opened 1 month ago

Luro02 commented 1 month ago

What it does

The methods are there for a reason, so might as well suggest using them.

Lint Name

No response

Category

api

Example

<code>

Could be written as:

<code>
Luro02 commented 3 days ago

Note this doesn't exist in Java 17, only in Java 21