asked 76.6k views
3 votes
Write a program that displays Welcome to Java five times.

asked
User Mfit
by
8.1k points

1 Answer

7 votes

Answer:

public static void main(String[] args) {

IntStream.range(1, 5).forEach(i -> {

System.out.println("Welcome to Java");

});

}

Step-by-step explanation:

answered
User Shmuli
by
7.9k points