learn java
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 The Software Craftsman this week in the Agile 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
Have you tried LearnNowOnline? http://www.learnnowonline.com/
subject: compilation error