fork 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.*;
  7.  
  8. // one class needs to have a main() method
  9. public class Ideone
  10. {
  11. // arguments are passed using the text field below this editor
  12. public static void main(String[] args)
  13. {
  14. URL aURL = new URL("http://e...content-available-to-author-only...e.com:80/docs/books/tutorial");
  15. System.out.println("protocol = " + aURL.getProtocol());
  16. }
  17. }
  18.  
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
Main.java:9: error: class Ideone is public, should be declared in a file named Ideone.java
public class Ideone
       ^
1 error
stdout
Standard output is empty