2 Mart 2020 Pazartesi

@SafeVarargs Anotasyonu

Giriş
Açıklaması şöyle.
Asserts that the code of the method or constructor does not perform unsafe operations on its arguments.
Java 9
Açıklaması şöyle. Artık private metodlarla da kullanılabiliyor.
Prior to Java 9, @SafeVarargs is allowed on non-overridable methods such as in static methods, final instance methods and constructors. Note that the annotation will throw an error if it is used in fixed arity methods. In Java 9,  @SafeVarargs can be used on private instance methods.

Hiç yorum yok:

Yorum Gönder