I am new to exception handling in java. I was just trying to clear my concepts,but i encountered the following problem.
Here is the code.
class Inn {
public static void main(String... args) {
try{
String i="Asd";
} catch(Exception e) {
System.out.println(e);
}
//i=7;
System.out.println(i);
}
}
And here is the error which is coming.
G:\javap>javac Inn.java
Inn.java:13: error: cannot find symbol
System.out.println(i);
^
symbol: variable i
location: class Inn
1 error