Cum folosim functia/metoda While Loops in Java

public class Application {

public static void main(String[] args) {
    int value = 0;

    while(value < 10)
    {
        System.out.println("Buna " + value);

        value = value + 1;
    }
  }
}
Output is:
Buna 0
Buna 1
Buna 2
Buna 3
Buna 4
Buna 5
Buna 6
Buna 7
Buna 8
Buna 9