What will be the output of the following code snippet? try { String name = null; System.out.printf(The
Question:
What will be the output of the following code snippet?
try {
String name = null;
System.out.printf("The length of the string is - %d", name.length());
}
catch (RuntimeException e)
{
System.out.printf("Runtime Exception");
}
catch (NullPointerException e)
{
System.out.println("Null Pointer Exception");
}
Fantastic news! We've Found the answer you've been seeking!
Step by Step Answer:
Related Book For
Java How To Program Late Objects Version
ISBN: 9780136123712
8th Edition
Authors: Paul Deitel, Deitel & Associates
Question Posted: