which exception method is used for error of strings.
and how to know which exception method is better
package com.codegym.task.task09.task0908;
/*
Exception while working with strings
*/
public class Solution {
public static void main(String[] args) throws Exception {
//write your code here
try {
String s = null;
String m = s.toLowerCase();
}
catch (IllegalArgumentException e)
{
System.out.println("IllegalArgumentException");
}
//write your code here
}
}