• Post Reply Bookmark Topic Watch Topic
  • New Topic

Error: Unresolved compilation problem: a cannot be resolved to a variable  RSS feed

 
Pradeep Appala
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator


What is the problem with the code? I am following The Complete Reference and similar code in the book runs just fine. Is there anything I am missing/ have extra in my code? Please help...
 
Maneesh Godbole
Bartender
Posts: 11445
18
Android Eclipse IDE Google Web Toolkit Java Mac Ubuntu
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Welcome to the Ranch.
You have declared the variables d and a inside the try block. They are not visible from the catch block.
Declare them outside the try block.
 
Pradeep Appala
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Maneesh!!
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!