Float number and underscore literal : Number Literal « JDK 7 « Java






Float number and underscore literal


public class Test {
  public static void main(String[] args) {
    float minAmount = 5_000F;
    float currentAmount = 5_250F;
    float withdrawalAmount = 500F;

  }
}

 








Related examples in the same category

1.Using underscores in literals to improve code readability
2.Underscore binary literal