java - Null Pointer Exception with objectinputstream -


this question has answer here:

i'm trying read list of names , phone numbers in. the program keeps throwing nullpointerexception. why doing this?

int i=0;         datab[] b = null;          //b = null;          // name of file open.         string filename = "datt.dat";          try {             // use reading data.             byte[] buffer = new byte[1000];             fileinputstream fileis = new fileinputstream("datt.dat");             objectinputstream input = new objectinputstream(fileis);              for(i=0; i<b.length; i++)              b[i]=(datab)input.readobject();              input.close(); 

b null, b.length throws exception


Comments

Popular posts from this blog

How to run C# code using mono without Xamarin in Android? -

c# - SharpSsh Command Execution -

python - Specify path of savefig with pylab or matplotlib -