I have a console application that after performing its tasks, must give feedback to the user, such as \"operation completed\" or \"operation failed\" and the detailed error.
You can just use nextLine(); as pause
import java.util.Scanner
//
//
Scanner scan = new Scanner(System.in);
void Read()
{
System.out.print("Press any key to continue . . . ");
scan.nextLine();
}
However any button you press except Enter means you will have to press Enter after that but I found it better than scan.next();