Feuermagier / autograder

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

final check doesn't work correctly when not initialized in all constructor #508

Closed Luro02 closed 1 month ago

Luro02 commented 2 months ago

Summary

When a non-final field is not initialized with a value, it implicitly assumes a default value. A final field must be explicitly initialized. When the final field is not initialized in each constructor, only in some or none, it can not be final, because then the code would not compile.

Lint Name

No response

Reproducer

<code>