Question 22:
Given the code fragment: public static void main (String [ ] args) throws IOException{ BufferedReader br = new BufferedReader (new InputStremReader (System.in)); System.out.print ("Enter GDP: "); //line 1 } Which code fragment, when inserted at line 1, enables the code to read the GDP from the user?
Answer options:
A. int GDP = Integer.parseInt (br.readline()); B. int GDP = br.read(); C. int GDP = br.nextInt(); D. int GDP = Integer.parseInt (br.next());