2016年Sun认证重点试题
Sun公司推出了Java以及Solaris技术认证方案。对于企业而言,可以借助这项认证作为招聘人才的评判标准,或是作为衡量员工技术水准的依据;在个人方面,通过这些认证也可以证明个人的技术能力。下面是最新的sun认证考试题及答案,希望能帮助到大家!
1.写出此程序的输出结果.
class Test_For
{
public static void main(String[] args)
{
int i=0;
for(show('A'); show('B')&&(i<2);show('C'))
{
i++;
show('D');
}
}
public static boolean show(char ch)
{
t(ch);
return true;
}
}
2.写出此程序的'输出结果.
class Demo
{
public static void main(String[] args)
{
int a=3,b=8;
int c=(a>b)?a++:b++;
tln("a="+a+"tb="+b+"tc+"+c);
int d=(a>b)?++a:++b;
tln("a="+a+"tb="+b+"tc+"+d);
int e=(a
tln("a="+a+"tb="+b+"tc+"+e);
int f=(a
tln("a="+a+"tb="+b+"tc+"+f);
}
}
3.写出此程序的输出结果.
class Demo
{
public static void main(String []args)
{
int i = 0, j = 5;
tp: for (;;)
{
i++;
for(;;)
if(i > j--) break tp;
}
tln("i = " + i + ", j = "+ j);
}
}
4.写出此程序的输出结果.
class DemoWhile_3
{
public static void main(String[] args)
{
int x=1;
while(x<10)
{
wx:while(x<7)
{
while(x<4)
{
t("A ");
x++;
break wx;
}
t("B ");
x++;
}
t("C ");
x++;
}
}
}
5.选择正确答案:
class Test
{
public static void main(String[] args)
{
String foo=args[1];
String bar=args[2];
String baz=args[3];
}
}
d:>java Test Red Green Blue
what is the value of baz?
A. baz has value of ""
B. baz has value of null
C. baz has value of "Red"
D. baz has value of "Blue"
E. baz has value of "Green"
F. the code does not compile
G. the program throw an exception
6.写出输出结果.
class Demo
{
public static void main(String[] args)
{
show(0);
show(1);
}
public static void show(int i)
{
switch(i)
{
default:
i+=2;
case 1:
i+=1;
case 4:
i+=8;
case 2:
i+=4;
}
tln("i="+i);
}
}
-
2016年计算机一级考试试题带答案
一、基本操作题(1)目前制造计算机所用的电子元件是A)电子管B)晶体管C)集成电路D)超大规模集成电路(2)计算机的主机由哪些部件组成?A)CPU、外存储器、外部设备B)CPU和内存储器C)CPU和存储器系统D)主机箱、键盘、显示器(3)十进制数45用二进制数表示是A)1100001B)...
-
开发完整J2EE解决方案的八个步骤
摘要:Java2企业版本(TheJava2EnterpriseEdition,J2EE)平台由4个主要的部分组成:规范,参考实现,兼容性测试包和BluePrints程序。BluePrints描述了一个分布式组件体系的最佳练习和设计指导方针。这篇文章介绍了一个由八个步骤组成的J2EE开发方法论,该方法是基于Rationa...
-
2017年计算机一级考试试题及答案
全国计算机等级考试时间2017年3月25-28日。你都做了哪些准备?下面小编为大家分享一些关于计算机一级考试试题及答案,细微可以帮助大家!1、下面(B)视图最适合移动、复制幻灯片。A)普通B)幻灯片浏览C)备注页D)大纲2、如果希望将幻灯片由横排变为竖排,需要更换(A)。...
-
2016最新计算机二级模拟试题
2016年计算机二级考试在即,本站小编为同学们带来最新二级考试模拟试题,快来练一练吧!一、选择题(每小题1分。共20分)1、设循环队列的存储空间为Q(1:35),初始状态为front=rear=35。现经过一系列入队与退队运算后,front=15,rear=15,则循环队列中的元素个数为()。A.15B.1...