1. public class naloga_2 {
  2. public static void main(String[] args) {
  3. int[][] stevila = new int[2][5];
  4. String niz = new String();
  5.  
  6. for(int i = 0; i < stevila.length; i++) {
  7. System.out.format("%2d.| ", i + 1);
  8. for(int j = 0; j < stevila[i].length; j++) {
  9. try {
  10. niz = javax.swing.JOptionPane.showInputDialog("Vpiši celo število!");
  11. stevila[i][j] = Integer.valueOf(niz).intValue();
  12. } catch(Exception e) {
  13. continue;
  14. }
  15.  
  16. System.out.format("%3d ", stevila[i][j]);
  17. }
  18. System.out.println();
  19. }
  20.  
  21. System.exit(0);
  22. }
  23. }