Can somebody enlighten me why do i get an exception ?
code is over here :
import java.io.InputStreamReader;
import java.util.*;
public class ObtainKey
{
public static void KeyAnalyzer(String input)
{
int idx = 0;
int tokenCount;
String inputArr[] = null;
StringTokenizer st = new StringTokenizer(input);
tokenCount = st.countTokens();
for (idx=0; idx<tokenCount; idx++)
{
inputArr[idx] = st.nextToken();
}
i get the exception @ inputArr[idx] = st.nextToken();
error message :
Exception in thread "main" java.lang.NullPointerException
at ObtainKey.KeyAnalyzer(ObtainKey.java:21)
at main.main(main.java:13)