您的位置:首页 > 编程语言 > Java开发

test5.18

2015-09-22 16:30 483 查看
/*target:create objects of the class in test17,then use

 * these objects to initial line.

 */

public class Test18 {

String test;

Test18(String s){test=s;System.out.println(test);}
public static void main(String[] args) {
Test18 a=new Test18("Hello ");
Test18 b=new Test18("Java ");
Test18 c=new Test18("World !");
Test18 [] line={a,b,c};
}

}

//result shows print function in class Test18 works
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签:  Java