I have a dual stack Linux machine that supports both IPv4 and IPv6 . Now my query is when ever i tried to call InetAddress.getLocalHost() it always gives me IPv4.
Can i have both IPv4 and IPv6 in InetAddress.getLocalHost() response . If not then how will i get IPv6 address from InetAddress.getLocalHost().