Win a copy of Spring in Action (5th edition) this week in the Spring forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Bear Bibeault
  • Devaka Cooray
  • Liutauras Vilda
  • Jeanne Boyarsky
Sheriffs:
  • Knute Snortum
  • Junilu Lacar
  • paul wheaton
Saloon Keepers:
  • Ganesh Patekar
  • Frits Walraven
  • Tim Moores
  • Ron McLeod
  • Carey Brown
Bartenders:
  • Stephan van Hulst
  • salvin francis
  • Tim Holloway

connect exception  RSS feed

 
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
in one of javacaps sample test question
**********************
22. There are two computers are connected to internet, one computer is trying to open a socket connection to read the home page of another computer, what are the posible exceptions thrown while connection and reading InputStrem.
A) IOException
B) MalformedURLException
C) NetworkException
D) ConnectException
Answer is A,B
but i thing that c should also be correct since the remote host may also refuse connection
if i am wrong please explain why
regards
mustafa
 
Author and all-around good cowpoke
Posts: 13078
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Is there even such a thing as a NetworkException?
I can find java.net.ConnectException but not NetworkException.
 
mohammed mustafa
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
oh that answer i think must be d, sorry that was a typing mistake as i also know that there is no such thing as network exception
 
Ranch Hand
Posts: 130
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Is ConnectException, a valid one in this situation?. no replies for that so far!!
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!