文档介绍:北京九恒星科技股份有限公司
2012年度软件开发录用试题
一、逻辑题
题目1-6依赖下面的叙述:
电影院中有6个座位,从左至右依次编号为1,2,3,4,5,6。现在有F,G,H,I,J 五位观众准备依照下面的条件坐在这6个座位上:
*每人只能作一个座位,6个座位中总有一个是空的
*I不能坐在2、4、6号座位
*J总是从左到右数的第三位观众,但并不意味着他必须坐在第3号座位:
*G总是坐在F右面,并且F相邻。
:
,下面那种情况一定不能发生:
,下面那种情况一定发生:
,下面哪种情况一定发生:
:
,H一定坐在哪个位置
,那些称自己每周固定进行2至3次健身锻炼的人
近二年来由28%增加到35%, 而对该市大多数健身房的调查则显示,近二年去健身房的
人数明显下降.
以下各项,如果为真,都有助于解释上述看来矛盾的断定,除了:
,往往少报顾客的人数
,该市健身房普遍调低了营业价格
,家庭健身活动成为可能并逐渐流行
%
二. 不定向选择
Java部分
is the output for the following lines of code?( )
(“”+2+3);
(2+3);
(2+3+””);
(2+“”+3);
pilation error at line3 23,5,5 and 23.
5,5,5 and 23. 23,5,23.
will happen when pile and run the following code?( )
public class MyClass{
static int i;
public static void main(String argv[]){
(i);
}
}
Variable i may not have been initialized
two are valid in a class that extends class A?(Choose two) ( )
class A{
protected int method1(int a,int b){return 0;}
}
A. public int method1(int a , int b) { return 0; }
B. private int method1(int a , int b) { return 0; }
C. private int method1(int a , long b) { return 0; }
D. public short method1(int a, int b) { return 0; }
4、Which statements, when inserted at the indicated position in the following code, will cause a runtime exception when attempting to run the program? ( )
class A{}
class B extends A {}
class C extends A{}
public class Test{
public static void main(String args[]){
A x = new A();
B