Files
openide/java/java-impl/resources/inspectionDescriptions/FieldMayBeStatic.html
2025-02-05 04:43:28 +00:00

15 lines
488 B
HTML

<html>
<body>
Reports instance variables that can safely be made <code>static</code>. A field
can be static if it is declared <code>final</code> and initialized with a constant.
<p><b>Example:</b></p>
<pre><code>
public final String str = "sample";
</code></pre>
<!-- tooltip end -->
<p>
The inspection does not report final fields that can be implicitly written. Use the "Annotations" button to modify
the list of annotations that assume implicit field write.
</p>
</body>
</html>