Write a static method that takes a domain name as its argument and returns the reverse domain

Question:

Write a static method that takes a domain name as its argument and returns the reverse domain name (reverse the order of the strings between periods).

For example, the reverse domain name of cs.princeton.edu is edu.princeton.

cs. This computation is useful for web log analysis. 

Fantastic news! We've Found the answer you've been seeking!

Step by Step Answer:

Related Book For  book-img-for-question
Question Posted: