My Problem: "return ipAddr" ipAddr cannot be resolved to a variable. So, is this because the method is static??
package oop.address;
import java.net.InetAddress;
public class address {
public static address createIP(String ip) {
try {
InetAddress ipAddr = InetAddress.getByName(ip);
} catch (Exception e) {
System.out.println("Fehler");
}
return null;
}
public InetAddress get_ipAddr(){
return ipAddr;
}
}