CS3135/CS2135
Object Oriented Programming (Java)
BSCS-3 / MCS-3
Lecture # 25
Network Programming
Part-2
Java Network Programming - URL
• A resource can be something as simple as a file or a directory, or it can be a reference to a more
complicated object, such as a query to a database or to a search engine.
java.net.URL
• URL(String) //URL
• String getFile()
• String getHost()
• String getPath()
• int getPort()
• String getProtocol()
• URLConnection openConnection()
Instructor: Tanzila Kehkashan
2
Instructor: Tanzila Kehkashan
3
Instructor: Tanzila Kehkashan
4

OOP Lecture 25-Network Programming-Part2.pptx