ClassNotFoundException when deserializing a binary class file's contents
I don't know much about Java. I'm trying to read a file containing an int and various instances of a class called "Automobile". When I deserialize it, though, the program throws a ClassNotFoundException and I can't seem to understand why. Here's the code: try { FileInputStream fin = new FileInputStream(inputFile); ObjectInputStream input = new ObjectInputStream(fin); conto = input.readInt(); Automobile[] macchine = new Automobile[conto]; for(int i = 0; i < conto; i++) { macchine[i] = (Automobile)input.readObject(); } String targa; System.out.print("\nInserire le cifre di una targa per