0
Attempted
20
Not Attempted
0
Marked For Review
0
Attempted & Reviewed
package exceptions; public class TestException5 { static String trimString(String x) { return x.trim(); } public static void main(String[] args) { try { String s = trimString(null); System.out.println("s = "+s); } catch(Exception e) { System.out.println(" Exception "); } catch(NullPointerException ne) { System.out.println("Null Pointer Exception "); } } }
Select Your Answer:
All Questions
Attempted
Not Attempted
Marked for Review
Attempted & Reviewed
Current