Java Graph Adjacency List error java.lang.NullPointerException...
Exception in thread "main" java.lang.NullPointerException.
According to the error, it seems to be in the printGraph() function.
Someone was able to help me and suggested the "try-catch". This removed the error, however it seems my printGraph() function still doesn't work. I think I might have an error with creating an object but I do not know how to fix this. Thank you!
Link to code: