wiley_pastebin icon

file input and output 1

wiley_pastebin | PRO | 03/15/19 03:06:30 PM UTC | 0 ⭐ | 3178 👁️ | Never ⏰ | []
Java |

330 B

|

None

|

0 👍

/

0 👎

public void processFile(String filename){
 String line;
 BufferedReader br; 
 try { 
  br = new BufferedReader(new FileReader(filename)); 
  line = br.readLine(); 
 } catch (FileNotFoundException e) { 
  // deal with file not found exception 
 } catch (IOException e) { 
  // deal with other io exceptions 
 }  
 // ...
}

Comments