You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

18 lines
577 B

import java.util.Map;
public class ExerciseRunner {
public static void main(String[] args) {
UrlParser parser = new UrlParser();
// Test case 1
String url1 = "https://www.example.com:8080/path?name=value";
Map<String, String> components1 = parser.parseURL(url1);
System.out.println("Components of URL 1: " + components1);
// Test case 2
String url2 = "http://example.com/";
Map<String, String> components2 = parser.parseURL(url2);
System.out.println("Components of URL 2: " + components2);
}
}