This is really nothing to do with
Java, but I'll have a quick go at this one.
The two examples given are completely different URLs. However, many browsers use heuristics to try to guess what the user meant, when given an incomplete URL.
For instance, if there's no protocol in the URL, as is the case with "www.lge.com", a browser may guess that the user meant "http://www.lge.com".
Most Web sites have a host name that starts with "www". However, that is only a convention and it is perfectly possible to have host names that start with something else. The URL "http://lge.com" is a plausible Web site URL, with the host "lge.com". However, if a browser finds that there is no Web site that that URL, it may guess that the user meant "http://www.lge.com".
Such guessing heuristics typically will not be available in Java. If you want to open a Web site in Java code, you will typically need to give a full URL, with correct protocol and host name.