As an assignment I have to find all the alive computers on a LAN. For which I am using isReachable function of InetAddress class. But problem is
Here are some details on why isReachable() might not always work as expected
The correct way for you is to use the ICMP protocol. This is what ping uses internatlly, I believe. Here is an example that get you started.