42. Creating the Thread public class First { public static void main(String args[]) { Worker runner = new Worker1(); runner.start(); System.out.println(“I am the main thread”); } }
44. Implementing Runnable class Worker2 implements Runnable { public void run() { System.out.println(“I am a Worker Thread”); } }
45. Creating the Thread public class Second { public static void main(String args[]) { Runnable runner = new Worker2(); Thread thrd = new Thread(runner); thrd.start(); System.out.println(“I am the main thread”); } }
46.
47.
48. Life Cycle of a Thread new Thread runnable blocked dead start( ) stop( ) sleep( ) suspend( ) resume( ) notify( ) wait( )
90. Connection-oriented Networking The client and server have a communication link that is open and active from the time the application is executed until it is closed. Using Internet jargon, the Transmission control protocol os a connection oriented protocol. It is reliable connection - packets are guaranteed to arrive in the order they are sent.
91. Connection-less Networking The this type each instance that packets are sent, they are transmitted individually. No link to the receiver is maintained after the packets arrive. The Internet equivalent is the User Datagram Protocol (UDP). Connectionless communication is faster but not reliable. Datagrams are used to implement a connectionless protocol, such as UDP.
92. Common Port Numbers HTTS (SSL) 443 IMAP 143 POP 110 Http (Web) 80 SMTP 25 Telnet 23 FTP 21 Service Port Number