Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- boolean canConnect = true;
- try {
- SocketAddress addr; // initialization not shown
- Socket s = new Socket();
- s.connect(addr);
- s.close();
- } catch (IOException e) {
- canConnect = false;
- e.printStackTrace();
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement