Testdome Java Questions And Answers -

public class FirstLineReader public static String getFirstLine(String filePath) try (BufferedReader br = new BufferedReader(new FileReader(filePath))) return br.readLine(); catch (IOException e) return "";

Explanation: The x++ expression increments the value of x after it is printed, so the output is 5. testdome java questions and answers

: 5