I code in c++ ever from the start but now have been working on project related to Network Administration on Java. Here a[i].addresses
returns a NetworkInterfaceAddress[]
(i.e., an array). But when I try to copy like this, it gives an error.
NetworkInterface[] a;
a=JpcapCaptor.getDeviceList();
NetworkInterfaceAddress[] b=new NetworkInterfaceAddress[a.length];
int i=-1;
while(++i<a.length)
b[i]=a[i].addresses;
This gives an error:
incompatible types: NetworkInterfaceAddress[] cannot be converted to NetworkInterfaceAddress.