Advanced JAVA: OOP and Networking. Dr. Hong Li*, Dr. Ali Setoodehnia *New York City College of Technology Kean University April 11, 2003. AGENDA:. Introduction to Java Introduction to Java Applets OOP, methods Java Networking. Introduction to Java.
Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author.While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.
Dr. Hong Li*, Dr. Ali Setoodehnia
*New York City College of Technology
April 11, 2003
g.drawLine(x, (int)f(x), x + 1, (int)f(x + 1)); } }
An Example of Applet
import java.net.*; // .net library
URL url; //declare url as URL
url = new URL(location);// create URL object
AppletContext Browser = getAppletContext();
browser.showDocument(url); // cause browser to
// display the url
Example: View HTML file
Waiting for connection
socket conn = new Socket(serverAddress, port);
3. Processing phase: Client and server communicate via the InputStream and OutputStream objects.
4. When transmission is complete, the client closes the connection by invoking the close method on the Socket
view code run clientrun client