JAVA Question:
In a class called DomainParser, write a methodgetTLD that gets a website link in String formatthen it retuthe top level domain. This program must print out therequired outputs.
You must use what is given:
import java.util.Scanner;public class topdemo{ public static void main(String[] args) { Scanner keyboard = new Scanner(System.in); System.out.println(“Enter a String”); String line = keyboard.nextLine(); System.out.println(“Top level domain:
PayPal Gateway not configured
PayPal Gateway not configured