public class KonversiAman {
    public static void main(String[] args) {
        String masukan = "4o2";   // salah ketik: huruf o
        try {
            int nilai = Integer.parseInt(masukan);
            System.out.println("nilai = " + nilai);
        } catch (NumberFormatException e) {
            System.out.println("gagal parsing: " + e.getMessage());
        }
        System.out.println("program tetap berjalan");
    }
}
