title: malformedURLException when declaring URL with string in Android
body: <p>According to Android reference you can declare an URL using a string. </p>
  
  <p>That means that the next code is supposed to be correct(i.e): </p>
  
  <pre><code> URL url = new URL("http://www.android.com/");
  </code></pre>
  
  <p>When I try to use it I get: </p>
  
  <blockquote>
    <p>"java.net.MalformedURLException"</p>
  </blockquote>
  
  <p>It happens to me on AndroidStudio 1.2.1.1</p>
  
  <p>The full code I'm trying to use comes from the references of HttpURLConnect of Android:</p>
  
  <pre><code> URL url = new URL("http://www.android.com/");
     HttpURLConnection urlConnection = (HttpURLConnection) url.openConnection();
     try {
       InputStream in = new BufferedInputStream(urlConnection.getInputStream());
       readStream(in);
      finally {
       urlConnection.disconnect();
     }
   }
  </code></pre>