• Post Reply Bookmark Topic Watch Topic
  • New Topic

HashMaps  RSS feed

 
Greenhorn
Posts: 23
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi guys, i am trying to give input values from the scanner as a string values into ".txt" file , which should be stored in HashMap. How should i do it? I tried as below but i am getting error....plzz help


 
Sheriff
Posts: 11494
180
Android Debian Eclipse IDE IntelliJ IDE Java Linux Mac Spring Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What error are you getting. Please TellTheDetails (←click)
 
Rao.K Reddy
Greenhorn
Posts: 23
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Exception in thread "main" java.lang.NullPointerException
at test.Test.main(Test.java:20)
 
Ranch Hand
Posts: 75
Android Chrome Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It's because you have File directory set to null on line 17 rather than giving it a path.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!