第5题: [单项选择]He had studied hard, he would have been able to pass the exam.
A. He had studied harder B. If only he studied more C. Had he studied harder D. When he studied more 参考答案:C 答案解析:[解析] 本题考查虚拟语气的用法。如果虚拟从句中含有助动词、情态动词、动词be或have,则可把if省略,把上类动词提到主语之前,使用倒装语序。
第17题: [单项选择]下列变量的定义中,错误的是______。 A. int x=3; B. float f; d; C. String s="Hello"; D. boolean b=true; 参考答案:B 答案解析:[解析] 正确的方法是float f, d;,中间应该使用“,”而不是“;”,因为在Java中“;”表示一个语句结束。