I am trying to do a String.split
on a website address using the "."
so that I can find the domain name of the website.
However, when I do this:
String href = "www.google.com";
String split[] = href.split(".");
int splitLength = split.length;
It tells me that the splitLength
variable is 0
. Why is this, and how can I make this work?