fork(32) download
  1. /* package whatever; // don't place package name! */
  2.  
  3. import java.util.*;
  4. import java.lang.*;
  5. import java.io.*;
  6. import java.net.URI;
  7.  
  8. /* Name of the class has to be "Main" only if the class is public. */
  9. class Ideone
  10. {
  11. public static void main (String[] args) throws java.lang.Exception
  12. {
  13. final URI u = new URI("//www.anigota.com/start");
  14.  
  15. if(u.isAbsolute())
  16. {
  17. System.out.println("Yes, i am absolute!");
  18. }
  19. else
  20. {
  21. System.out.println("Ohh noes, it's a relative URI!");
  22. }
  23.  
  24. }
  25. }
  26.  
Success #stdin #stdout 0.1s 320256KB
stdin
Standard input is empty
stdout
Ohh noes, it's a relative URI!