HTTP Webserver Using Java

import java.net.*;import java.io.*;class myserver{public static void main(String str[]){String myIp=null;int port=786;try{//Get Systems current ip addressmyIp= Inet4Address.getLocalHost().getHostAddress();System.out.println(“Server is Running with “+ myIp +”:”+ port);//Create Server SocketServerSocket welcome = new ServerSocket(port);//Accept incomming connection SocketSocket sskt = welcome.accept();PrintWriter out = new PrintWriter(sskt.getOutputStream());//Create MIME type to describe that, This is HTML Codeout.println(“HTTP/1.1 200 OK”);out.println(“Content-Type: text/html”);out.println(“rn”);//Write your HTML Code Hereout.println(“Hello worldn”);out.flush();out.close();}catch(Exception