Given the sample code:
public class RoseindiaSample {
public static void main(String[] args) {
int k=5;
System.out.println(getBoolean()? k=3*k++:k+++ ++k);
}
public static boolean getBoolean(){
if((int)(Math.random()*3)==0)
return false;
else
return true;
}
}
Select the correct sentences.
(1) Compilation error
(2) Print 12 on each time of execution
(3) Print random 12 or 15 at each execution.
(4) Print 7 or 9 at each execution.
The above code prints either 12 or 15 on each execution.