自考生网为考生们整理提供了“福建2018年4月自考07017面向网络编程技术历年真题及答案”,更多07017面向网络编程技术真题内容可点击查看07017面向网络编程技术真题及答案汇总。
注:不同省份、不同专业的自考历年真题及答案,只要课程代码和课程名称相同,都可参考使用。
1、以下字符组合中,不能作为Java整型常量的是
A.037
B.0x3ADG
C.7000
D.0x3abcL
2、执行表达式1<<4的结果为
A.1
B.4
C.8
D.16
3、已知变量a 为float类型,变量b为char类型,变量c为int 型,变量d为double类型,则表达式a +b+c+d的数据类型为
A.float
B.char
C.int
D.double
4、以下代码的输出结果为:
int a = 2;
char ch = 'b’;
System. out. println(“hello”+a + ch);System. out. println( a/4) ;
A.输出hello2b,0
B.输出hello2b,0.5
C.输出hello298,0
D.输出hello298,0.5
5、下面程序的运行结果为
int i,j,k;
for( i = 10;i<13;i ++ )
for(j = 11 ;j<14;j++ )
for(k = 12;k <15;k ++ )
if( ( i ==j)&&(j ==k))
System. out. println( i);
A.10
B.11
C.12
D.13
6、为了支持以面向对象的方式处理简单数据类型,Java为每一种基本数据类型提供的类是
A.Math
B.Wrapper
C.String
D.Data
7、在String类中用于将字符串对象中的字符转换为一个字符数组的方法是
A.toCharArray()
B.subString()
C.charAt( )
D.trim( )
8、与Applet类的生命周期无关的方法是
A.destroy( )
B.start( )
C.stop()
D.create( )
9、当参数为5和0时,以下程序的执行结果为
A.输出Exception
B.输出Finally
C.输出Exception Finally
D.无输出结果
10、设有如下变量,以下哪条语句编译不出错
char c = 'b';
int i = 12;
String s =“Hello world”
A.c = c + i
B.s+ =i
C.i+ =s
D.c+ = s
11、11.以下程序的调试结果为
A.编译错误:abstract方法不能被子类重写
B.编译错误:包含abstract方法的类必须声明为abstract
C.编译正确,运行时出现空指针异常
D.编译与运行均无误,运行时将打印输出字符串“gugu”
12、设有以下代码,为了让屏幕上打印输出“test2”,则变量a的取值为
if( a >5)
System. out. printIn(“test1");else if( a > 10)
System. out. println(“test2”);else
System. out. println(“test3” );
A.无任何可能
B.小于5
C.5和10之间
D.大于10
13、在JSP中用于将一个静态或动态的页面引入到一个JSP文件中,需要使用的指令是
A.private
B.public
C.protected
D.final
14、已知 int x = 3,y =5,则x^y^y的结果为
A.3
B.5
C.8
D.15
15、以下方法声明中,可以与方法void Func( int a ,double b){…}构成重载的有
A.void Func( int a , double b, int c){…}
B.int Func( int a , int b){…}
C.void Func( int c,int d){--}
D.void Func( int d , double f){…}
E.int Func( int a , double b){…}
全专业电子资料、题库、学位、网课
最高直省2344元
上千+科次精品网课
买网课即送全真模考题库
五千+科次教材资料
电子资料满三件9折
五千+科次在线题库
全真呈现历年考试试题