public class Tester { public static void main(String[] args) { String stmt = "javachamp 2009"; String[] arr = stmt.split(" "); try { int x = Integer.parseInt(arr[0]); System.out.print(x); } catch (Exception e) { System.out.print("catch"); } finally { System.out.print("finally"); } } }
public static void main(String[] args) {
String stmt = "javachamp 2009";
String[] arr = stmt.split(" ");
try {
int x = Integer.parseInt(arr[0]);
System.out.print(x);
} catch (Exception e) {
System.out.print("catch");
} finally {
System.out.print("finally");
}
Oracle Certified Professional Java Programmer
Access: Public Instant Grading
Jobilize.com uses cookies to ensure that you get the best experience. By continuing to use Jobilize.com web-site, you agree to the Terms of Use.