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.
Betty Rubble? Well, I would go with Betty... but I'd be thinking of Wilma.
The sites sometimes are NOT very clever that they buy the Domain Namewww.xyz.org instead of xyz.org so that unless you give explicitly the one starting with www., you cannot reach the site.
(also I guess, related with the configuration of either the client software and/or server on which the site is being hosted.) But the thing is that, one should get the domain-name without the www while buying.
Destiny's powerful hand has made the bed of my future. And this tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop