Tutorials
Courses
Data Structure
Java
Python
HTML
Interview Preparation
DSA
Practice Problems
C
C++
Java
Python
JavaScript
Data Science
Machine Learning
Courses
Linux
DevOps
SQL
Web Development
System Design
Aptitude
GfG Premium
Similar Topics
Web Technologies
37.4K+ articles
DSA
22.8K+ articles
Java
10.8K+ articles
Java-Functions
4.2K+ articles
Strings
3.3K+ articles
Pattern Searching
623+ articles
java-regular-expression
92+ articles
python-regex
79+ articles
Java-net-package
47+ articles
CPP-regex
39+ articles
Java-URL
18 posts
Recent Articles
Popular Articles
URL getDefaultPort() method in Java with Examples
Last Updated: 27 December 2018
The getDefaultPort() function of URL class returns the default port of a specified URL. If the URL scheme or the URLStreamHandler for the URL do not define a default port ...
read more
Java
Java-Functions
Java-net-package
Java-URL
URL getAuthority() method in Java with Examples
Last Updated: 27 December 2018
The getAuthority() function is a part of URL class. The function getAuthority() returns the authority of a specified URL. The Authority part of the URL is the host name an...
read more
Java
Java-Functions
Java-net-package
Java-URL
URL getHost() method in Java with Examples
Last Updated: 27 December 2018
getHost() function is a part of URL class. The function getHost() returns the Host of a specified URL. The Host part of the URL is the host name of the URL. The format of ...
read more
Java
Java-Functions
Java-net-package
Java-URL
URL getPort() method in Java with Examples
Last Updated: 27 December 2018
The getPort() function is a part of URL class. The function getPort() returns the port of a specified URL. The function returns the port number or -1 if the port is not s...
read more
Java
Java-Functions
Java-net-package
Java-URL
URL getProtocol() method in Java with Examples
Last Updated: 27 December 2018
The getProtocol() function is a part of URL class. The function getProtocol() returns the Protocol of a specified URL. Function Signaturepublic String getProtocol() Syntax...
read more
Java
Java-Functions
Java-net-package
Java-URL
URL getFile() method in Java with Examples
Last Updated: 31 December 2018
The getFile() function is a part of URL class. The function getFile() returns the file name of a specified URL. The getFile() function returns the path and the query of th...
read more
Java
Java-Functions
Java-net-package
Java-URL
URL getPath() method in Java with Examples
Last Updated: 31 December 2018
The getPath() function is a part of URL class. The function getPath() returns the Path name of a specified URL.Function Signature:public String getPath()Syntax:url.getPath...
read more
Java
Java-Functions
Java-net-package
Java-URL
URL getQuery() method in Java with Examples
Last Updated: 31 December 2018
The getQuery() function is a part of URL class. The function getQuery() returns the Query of a specified URL.Function Signature:public String getQuery()Syntax:url.getQuery...
read more
Java
Java-Functions
Java-net-package
Java-URL
URL getUserInfo() method in Java with Examples
Last Updated: 31 December 2018
The getUserInfo() function is a part of URL class. The function getUserInfo() returns the UserInfo part of a specified URL.Function Signature:public String getUserInfo()Sy...
read more
Java
Java-Functions
Java-net-package
Java-URL
URL getRef() method in Java with Examples
Last Updated: 31 December 2018
The getRef() function is a part of URL class. The function getRef() returns the Reference or anchor part of a specified URL.Function Signature:public String getRef()Syntax...
read more
Java
Java-Functions
Java-net-package
Java-URL
URL toExternalForm() method in Java with Examples
Last Updated: 31 December 2018
The toExternalForm() function is a part of URL class. The function toExternalForm() returns the string representation of a specified URL. The string is created by calling ...
read more
Java
Java-Functions
Java-net-package
Java-URL
Check if an URL is valid or not using Regular Expression
Last Updated: 07 December 2022
Given a URL as a character string str of size N.The task is to check if the given URL is valid or not.Examples :Input : str = "https://www.geeksforgeeks.org/"Output : YesE...
read more
Strings
Pattern Searching
DSA
python-regex
java-regular-expression
CPP-regex
Java-URL
regular-expression
Difference between getPath() and getCononicalPath() in Java
Last Updated: 14 September 2022
Prior to discussing the differences lets quickly recap all three methodsgetPath() MethodgetAbsolutePath() MethodgetCanonicalPath() Method1. getPath() MethodgetPath() is a ...
read more
Java
Difference Between
Java-URL
java.net.URL Class in Java
Last Updated: 03 April 2023
URL is an acronym of Uniform resource locator. It is a pointer to locate resource in www (World Wide Web). A resource can be anything from a simple text file to any other ...
read more
Java
Picked
Java-net-package
Java-URL
How to Convert a String to URL in Java?
Last Updated: 15 May 2024
In Java, a string is a sequence of characters. A URL, which is short for Uniform Resource Locator, refers to a web resource that specifies its location on a computer netwo...
read more
Java
Java Programs
Picked
Java-URL
Java Examples
1
2
We use cookies to ensure you have the best browsing experience on our website. By using our site, you acknowledge that you have read and understood our
Cookie Policy
&
Privacy Policy
Got It !