GeezerVisonThe World Wide Web, restored to 800 pixels of glory. |
| Home|About|Gaming cabinet|Archives|How it works|Starter sites |
GeezerVison is showing www.geeksforgeeks.org — URL getFile() method in Java with Examples - GeeksforGeeks URL getFile() method in Java with ExamplesLast Updated : 31 Dec, 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 the URL.
Function Signature:
public String getFile()Syntax: url.getFile()Parameter: This function does not require any parameter Return Type: The function returns String Type Below programs illustrates the use of getFile() function: Example 1: Given a URL we will get the file using the getFile() function.
Output:
Example 2: Now see how getFile() is different from getPath(). getPath() will exclude the query but getFile() will include the query
URL = https:// www.geeksforgeeks.org/url-getprotocol-method-in-java-with-examples/ File= /url-getprotocol-method-in-java-with-examples/
Output:
URL = https:// www.geeksforgeeks.org/url-getprotocol-method-in-java-with-examples?title=protocol File= /url-getprotocol-method-in-java-with-examples?title=protocol Comment Explore |
| You are visitor 01402520 — GeezerVison does not store the pages you look up. Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required. |