将“;”插入到完整 Statement 中


package cxsj;

//获取本机ip地址及主机名

import java.net.InetAddress;
 
public class Main {
   public static void main(String[] args) 
   throws Exception {
      InetAddress addr = InetAddress.getLocalHost();
      System.out.println("Local HostAddress: "
      "+addr.getHostAddress());"
      String hostname = addr.getHostName();
      System.out.println("Local host name: "+hostname);
   }
}

img


将“;”插入到完整 Statement 中
这个问题怎么解决


 
package cxsj;
//获取本机ip地址及主机名
import java.net.InetAddress;
public class Main {
   public static void main(String[] args) 
   throws Exception {
      InetAddress addr = InetAddress.getLocalHost();
      System.out.println("Local HostAddress: "+addr.getHostAddress() + ";");
      String hostname = addr.getHostName();
      System.out.println("Local host name: "+hostname);
   }
}

13行分号位置不对