This week's giveaway is in the Spring forum.
We're giving away four copies of REST with Spring (video course) and have Eugen Paraschiv on-line!
See this thread for details.
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

Win a copy of REST with Spring (video course) this week in the Spring forum!
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!