Himalaya Kaushik wrote:
but i am getting the error" the type java.io.ObjectInputStream cannot be resolved to a type. It is indirectly refrenced from .class file."
There is nothing in the code that you shown, that is related to the ObjectInputStream class. You need to elaborate a bit on what you are doing -- perhaps explain how the ObjectInputStream is referenced? and what you mean by "indirectly"?
There is nothing (related to ObjectInputStream) wrong with the code you provided (assuming the code in the original post and the uploaded images are the same). There is however, something wrong with your environment. It does mention something wrong with the build path -- perhaps you should fix that first?