3 Replies Latest reply: Jul 27, 2011 8:52 AM by 853792 RSS

    Java URI changes in JDK 1.5 vs JDK 1.4

      import java.net.*;
      public class TestURI {
           public static void main(String args[]) throws URISyntaxException
              String first = new String("foo");
              String second = new String("bar");
              String third = new String("[space or another space]");
              URI temp = new URI(first, second, third);
      When I run the above code in JDK 1.4, I get

      [space or another space]

      When I run the same code in JDK 1.5/1.6, I get the following:


      Could somebody tell me what changed?


      Edited by: Raj on Jul 27, 2011 7:17 AM