• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

compilation error

 
puja dayal
Ranch Hand
Posts: 65
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator




i am getting a compilation error here ' unreachable statement serversocket.close()'
 
Ganesh Malaichamy
Greenhorn
Posts: 27
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Watch out for the line System.exit(-1). Whenever the exception occurs the last line will not get executed because of this System.exit.
 
Sachin H. Gupta
Greenhorn
Posts: 17
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The code is reachable but it must be enclosed in the try-catch block as it throws an IOExcpetion
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic