fork download
  1. /* package whatever; // don't place package name! */
  2.  
  3. import java.util.*;
  4. import java.lang.*;
  5. import java.io.*;
  6.  
  7. /* Name of the class has to be "Main" only if the class is public. */
  8. class Ideone
  9. {
  10. InputStream wrapped(InputStream raw){
  11. BufferedReader reader = new BufferedReader(raw, StandardCharsets.UTF8);
  12. return new InputStream(){
  13. byte[] line = new byte[0];
  14. int pos = 0;
  15. int read(){
  16.  
  17. if(pos>=len.length){
  18. if(!getNextLine()){
  19. return -1;
  20. }
  21. }
  22. return line[pos++];
  23.  
  24.  
  25.  
  26. }
  27. boolean getNextLine(){
  28.  
  29. }
  30.  
  31. }
  32.  
  33. }
  34. public static void main (String[] args) throws java.lang.Exception
  35. {
  36.  
  37. }
  38. }
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
Main.java:12: error: '(' or '[' expected
		return new InputStream{
		                      ^
Main.java:15: error: ';' expected
			int read(){
			        ^
Main.java:27: error: ';' expected
			boolean getNextLine(){
			                   ^
Main.java:34: error: class, interface, or enum expected
	public static void main (String[] args) throws java.lang.Exception
	              ^
4 errors
stdout
Standard output is empty