Java mcq

switch (val);case 1;System.out.print(“P”);case 2;case 3;System.out.print(“Q”);break;case 4;System.out.print(“R”);default;System.out.print(“S”);What is the output?;A.;PQS;B.;PQ;C.;S;D.;P;4 points;Question 2;How many times will “hello” be printed by the following;for (int i = 0, i 9);System.out.println(“Test B”);else;System.out. println(“Test C”);Which one of the alternatives below will result in “Test C” being printed;A.;val is 4;B.;no values of val will do this;C.;val