public static boolean isIPv6Reference(String address){
  return address.charAt(0) == '[' && address.charAt(address.length() - 1) == ']';
}

public static boolean isIPv6Reference ( String address ) { return address . charAt ( 0 ) == '[' && address . charAt ( address . length ( ) - 1 ) == ']' ; }
verifies whether the ipv6reference , i . e . whether it enclosed in square brackets
