how I can get the last 3 characters in the string link ?
I have the link such as :
"http://www.google.com"
How I can get the “com” only ?
and put these characters in variable “String data type” ?
note : I’m new in java ,I’m develop the android app and must be get this code , please :\
Assuming that the
urlwill end with.XXX(continuous extension)Where
urlis yoururl(www.google.comin this case).Note that if the
urlishttp://www.google.com/then the code will return.com/. So you need to perform a check if the result contains/character. (Hint: look forcontainsin the String API).