final int NUM=5; int i; String[] str = new String[NUM]; Scanner sc = new Scanner(System.in); for (i=0; i