Skip to content

Latest commit

 

History

History
14 lines (11 loc) · 297 Bytes

public_fields.md

File metadata and controls

14 lines (11 loc) · 297 Bytes

Public Fields

Similarly to methods, for a field to be used from a different package it must be marked public.

package village;

public class Well {
    // Both of these you can use from a different package
    public static final int DEPTH = 10;
    public int remainingWater;
}