나는 말도 안되는 말을하지 않을 것입니다. 나는 당신에게 코드를 게시 할 것입니다. 특정 코드는 다음과 같습니다.
public String getLocalHostName () {String hostName; try {inetAddress addr = inetAddress.getLocalHost (); hostName = addr.gethostName ();} catch (예외) {hostname = ";} return hostname;} public string [] {string [] getalllocalhostip () {retallocalhostip () {retallocalhostip () getLocalHostName (); if (hostname.length ()> 0) {inetAddress [] addrs = inetAddress.getAllByName (hostName); if (addrs.length> 0) {retg = new String [addrs.length]; for (int i = 0; i <addrs.length; i ++) {ret [i] = =. addrs [i] .gethostaddress ();}}}} catch (예외) {ret = null;} return ret;}위의 코드는 편집자가 도입 한 여러 네트워크 카드의 로컬 IP를 얻기위한 관련 코드입니다. 궁금한 점이 있으면 메시지를 남겨주세요. 나는 시간에 당신과 소통하고 함께 배우고 함께 진행할 것입니다. 동시에 Wulin Network 웹 사이트에 대한 귀하의 지원에 감사드립니다!