Back to Browse

8 | Input Mismatch Exception In JAVA - Malayalam Tutorial

187 views
Dec 2, 2023
2:17

Scanner Class - Input Mismatch Exception In JAVA Please find the program below: public static void main(String[] args) { Scanner s= new Scanner(System.in); System.out.println("Enter your name: "); String n = s.nextLine(); System.out.println("Enter your age: "); int age = s.nextInt(); System.out.println("Interest rate? "); double rate = s.nextDouble(); System.out.println("Hi "+n); System.out.println("Age: "+age); System.out.println("Interest Rate : "+rate); }

Download

1 formats

Video Formats

360pmp42.9 MB

Right-click 'Download' and select 'Save Link As' if the file opens in a new tab.

8 | Input Mismatch Exception In JAVA - Malayalam Tutorial | NatokHD