Java - Cast int to float

Description

Cast int to float

Demo

public class Main{

  public static void main(String[] args) {
    for(int i = 50; i < 150; i++) {
      System.out.print((float) i);
      System.out.print(" ");
    }/*from   w w w  .  ja v  a2 s.  c  om*/
  }
}

Related Topic