File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Sockets and Internet Protocols and the fly likes compilation error Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Sockets and Internet Protocols
Bookmark "compilation error" Watch "compilation error" New topic

compilation error

puja dayal
Ranch Hand

Joined: May 27, 2013
Posts: 65

i am getting a compilation error here ' unreachable statement serversocket.close()'
Ganesh Malaichamy

Joined: Feb 11, 2011
Posts: 27
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

Joined: Oct 10, 2012
Posts: 17
The code is reachable but it must be enclosed in the try-catch block as it throws an IOExcpetion
I agree. Here's the link:
subject: compilation error
It's not a secret anymore!