随笔分类 -  scjp

摘要:题目如下:interface Foo{} class Alpha implements Foo{} class Beta extends Alpha{} public class Delta extends Beta{ public sta... 阅读全文
posted @ 2014-08-31 22:38 robin·张 阅读(298) 评论(0) 推荐(0) 编辑
摘要:题目为如下代码的执行结果:class Building{}public class Barn extends Building{ public static void main(String[] args){ Building build1 = new Bui... 阅读全文
posted @ 2014-08-31 19:16 robin·张 阅读(239) 评论(0) 推荐(0) 编辑
摘要:题目为如下代码的执行结果:abstract class Vehicle{ public int speed(){ return 0; }}class Car extends Vehicle{ public int speed(){ return 60; ... 阅读全文
posted @ 2014-08-29 22:08 robin·张 阅读(297) 评论(0) 推荐(0) 编辑
摘要:题目,如下代码的执行结果:import java.util.ArrayList;class Pizza{ ArrayList toppings; public final void addTopping(String topping){ toppings.add(t... 阅读全文
posted @ 2014-08-28 22:22 robin·张 阅读(240) 评论(0) 推荐(0) 编辑
摘要:题目——如下代码的执行结果:class Hello{ String title; int value; public Hello(){ title += " World!"; } public Hello(int value){ ... 阅读全文
posted @ 2014-07-18 10:35 robin·张 阅读(186) 评论(0) 推荐(0) 编辑
摘要:题一,如下代码的执行结果:class Person{ String name = "No name"; public Person(String nm){name = nm;} } class Employee extends Person{ String empID = "... 阅读全文
posted @ 2014-06-26 16:05 robin·张 阅读(411) 评论(0) 推荐(0) 编辑
摘要:如下代码,在所指示的位置插入代码能够正常编译:class Alpha{ public void bar(int... x){}; public void bar(int x){};} public class Beta extends Alpha{ //insert code ... 阅读全文
posted @ 2014-06-26 10:56 robin·张 阅读(241) 评论(0) 推荐(0) 编辑
摘要:好吧这道题我丢脸了,竟然做错了。如下程序的输出结果是:class Alligator{ public static void main(String[] args){ int[]x[] = {{1,2},{3,4,5},{6,7,8,9}}; int[][]y... 阅读全文
posted @ 2014-06-19 16:41 robin·张 阅读(195) 评论(0) 推荐(0) 编辑
摘要:判断如下程序的最终输出值:import java.util.*;public class Quest{ public static void main(String[] args){ String[] colors = {"blue", "red", "green", "yello... 阅读全文
posted @ 2014-06-19 16:10 robin·张 阅读(256) 评论(0) 推荐(0) 编辑
摘要:判断如下代码的执行结果:public class Spock{ public static void main(String[] args){ Long tail = 2000L; Long distance = 1999L; Long story = 10... 阅读全文
posted @ 2014-06-19 13:58 robin·张 阅读(290) 评论(0) 推荐(0) 编辑
摘要:判断如下代码最后的执行结果。public class Breaker{ static String o = ""; public static void main(String[] args){ z: o = o+2; for(int x=3; ... 阅读全文
posted @ 2014-06-19 09:26 robin·张 阅读(266) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示