Given a URL as a string, the task is to extract username, password, profile, role, and key from the URL in a GET Method.
- Firstly, Remove the web Link from the given URL using the split method.
- Secondly, Split the URL where “&” operator is Found.
- In the end, Replace each index value from “=” to “: “.
Below is the implementation of the above approach:
username: Vikas pwd: 1@@2 profile: developer role: SoftwareDeveloper key: Assitant
Attention reader! Don’t stop learning now. Get hold of all the important Java and Collections concepts with the Fundamentals of Java and Java Collections Course at a student-friendly price and become industry ready.
- Java program to store a Student Information in a File using AWT
- Java.util.BitSet.get() in Java
- Java.util.LinkedList.get(), getFirst(), getLast() in Java
- Calendar.get() Method in Java
- ArrayList get(index) method in Java with examples
- LinkedList get() Method in Java
- HashMap get() Method in Java
- LinkedHashMap get() Method in Java
- IdentityHashMap get() Method in Java
- Hashtable get() Method in Java
- TreeMap get() Method in Java
- Year get() method in Java with Examples
- EnumMap get() Method in Java
- WeakHashMap get() Method in Java
- Vector get() Method in Java
- Array get() Method in Java
- ConcurrentHashMap get() Method in Java
- ByteBuffer get() method in Java with Examples
- Provider get() method in Java with Examples
- CopyOnWriteArrayList get() method in Java
If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to firstname.lastname@example.org. See your article appearing on the GeeksforGeeks main page and help other Geeks.
Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.