SHARE
TWEET

Untitled

a guest Feb 20th, 2019 59 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. public class JavaParser {
  2.  
  3.     private int noOfLines;
  4.  
  5.     public void parse(String javaCode){
  6.         String[] lines = javaCode.split("[rn]+");
  7.         for(String line : lines)
  8.             System.out.println(line);
  9.     }
  10.  
  11.  
  12.  
  13.      public static void main(){
  14.             JavaParser a = new JavaParser();
  15.             a.parse("java code;");
  16.      }
  17. }
  18.    
  19. FileInputStream inputStream = new FileInputStream("foo.java");
  20. try {
  21.     String everything = IOUtils.toString(inputStream);
  22. } finally {
  23.     inputStream.close();
  24. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top