Java while loop
#Java #while #loop
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
// while loop = executes a block of code as long as a it's condition remains true
Scanner scanner = new Scanner(System.in);
String name = "";
while(name.isBlank()) {
System.out.print("Enter your name: ");
name = scanner.nextLine();
}
System.out.println("Hello "+name);
}
}
On this page of the site you can watch the video online Java while loop 🔄 with a duration of hours minute second in good quality, which was uploaded by the user Bro Code 19 October 2020, share the link with friends and acquaintances, this video has already been watched 93,673 times on youtube and it was liked by 3.6 thousand viewers. Enjoy your viewing!