Hello all
I am using reading a config file in which there is a entry
code_list="515,522,560,000"
while i am reading this string in my java application and using split on it and then assigning it to a string[].it is giving null pointer exception.needed code is as follows
static String[] splittArray=null;
code_req=properties.getProperty("code_list");
if (code_req != null || !code_req.equalsIgnoreCase(""))
{
splittArray=code_req.split(",");
System.out.println(code_req + " code request and splittarray" + splittArray);
}
output comes as follows
Reading configuration file :: ./config.cfg
"515,522,560,000" code request and splittarray[Ljava.lang.String;@a981ca
This exception is caught
READ CONFIG FILE :: java.lang.NullPointerException