Demo entry 6720828

Try-With-Resources

   

Submitted by anonymous on Mar 18, 2018 at 18:32
Language: Java. Code size: 141 Bytes.

BufferedReader br = new BufferedReader(new FileReader(path));
	try {
	return br.readLine();
	} finally {
	if (br != null) br.close();
	}

This snippet took 0.00 seconds to highlight.

Back to the Entry List or Home.

Delete this entry (admin only).