Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        Scanner input = new Scanner(System.in);
        String confirm = "y";

        do {
            System.out.println("Welcome to Java Programming!");
            System.out.println("Print Again? (y/n)");
            confirm = input.nextLine();
        } while (confirm.equalsIgnoreCase("y"));
    }
}