How to write a java program that will ask for the length and width of a rectangle and then multiply them together and create a rectangle out of astrisks

Question:
How to write a java program that will ask for the length and width of a rectangle and then multiply them together and create a rectangle out of astrisks?

Code:
import java.util.Scanner;
 
public class Rectangle {
 
  public static void main(String[] args) {
 
    Scanner sc = new Scanner(System.in);
 
    System.out.print("Enter height: ");
    int h = sc.nextInt();
 
    System.out.print("Enter width: ");
    int w = sc.nextInt();
 
    for(int i=0;i<h;i++){
      for(int j=0;j<w;j++){
        System.out.print("*");
      }
      System.out.println();
    }
  }
}

Output:
$ java Rectangle
Enter height: 5
Enter width: 20
********************
********************
********************
********************
********************

Find closest value to 0 for Float in Java?

Question:
Find closest value to 0 for Float in Java?

Answer:
Float.MIN_VALUE

Code:
public class MyFloat {
  public static void main(String[ ] args) {
    Float f = new Float(Float.MIN_VALUE);
    System.out.format("%.50f%n", f);
  }
}
 

Output:
$ java MyFloat
0.00000000000000000000000000000000000000000000140130