题目内容

写出下列程序段的运行结果class Parent {String one, two;public Parent(String a, String b){one = a;two = b;}public void print(){ System.out.println(one); }}public class Child extends Parent {public Child(String a, String b){super(a,b);}public void print(){System.out.println(one + " to " + two);}public static void main(String args[]){Parent p = new Parent("south", "north");Parent t = new Child("east", "west");p.print();t.print();}}

查看答案
更多问题

写出下列程序段的运行结果class change{void changeint(int x){x++;} public static void main(String args[]){int a=2;System.out.println("Before changed:"+"a="+a);change cxz=new change();cxz.changeint(a);System.out.println("After changed:"+"a="+a);}}

写出下列程序段的运行结果abstract class Shape {abstract void display();}class Circle extends Shape {void display() {System.out.println("Circle");}}class Rectangle extends Shape {void display() {System.out.println("Rectangle");}}class Triangle extends Shape {void display() {System.out.println("Triangle");}}public class AbstractClassDemo{public static void main(String args[]){(new Circle()).display();(new Rectangle()).display();(new Triangle()).display();}}

写出下列程序段的运行结果public class TestArray{public static void main(String args[ ]){int i , j ;int a[ ] = { 5,9,6,8,7};for ( i = 0 ; i < a.length-1; i ++ ) {int k = i;for ( j = i ; j < a.length ; j++ )if ( a[j]

生物神经元模型主要有那几部分组成?

A. 树突
B. 细胞核
C. 轴突
D. 轴突末梢

答案查题题库