Writing to a File

Since my last blog, I have started to write code to serialize an object into a CSV file.

The concept that I have based this project around is Pokémon. It is something that I have grown up on and can easily translate into serialization. The object that is being serialized will be a specfic Pokémon. The attributes of said The concept that I have based this project around is Pokémon. It is something that I have grown up on and can easily translate into serialization. The object that is being serialized will be a specfic Pokémon. The attributes of said Pokémon will be uploaded to PokéDex.csv. From the PokéDex.csv file, we will pull the attributes out to determine if the Pokémon that we are “seeing” (the new object that we created with the attributes from the PokéDex.csv file) is the same as the Pokémon that we had collected the original data from. That is the way I am approaching this project.

While coding this, I have run into a NullPointerException (I will put a screenshot of the error at the end) because when it attempts to read my file it cannot because it is null. This happens even when I write to the file. I even tried using a txt file but the same error occured. To see my code visit my github that is linked on this website.

Broken Code