I have to say I am a newbie in java programming so I would like some help with the following question:
How can I delay a java program so that it waits for a user to give an input? Here is my code:
import java.util.Scanner;
public class test {
public static void main(String[] args) {
System.out.println("1st value= ");
Scanner aa1 = new Scanner(System.in);
System.out.println("2nd value= ");
Scanner bb1 = new Scanner(System.in);
What I get now from this code is "1st value= " and "2nd value= " displayed. After that the program requests the input. Any ideas on how can I make this simple programm to wait for the user's answer before printing "2nd value= " in the console?