紧急需要一个JAVA程序设计 请哥哥姐姐们帮忙 谢谢!~!~!~!~

来源:百度知道 编辑:UC知道 时间:2024/05/17 11:11:36
要简单实用!~1

public class Test{ //类名首字母要大写

public Test(int i){//构造方法

System.out.ptintln("整数I的值是:"+i);
}
public void fangfa(String name){
System.out.ptintln(name+"HELLO WORLD!");
}

public static void main(String [] s){
Test t = new Test(10);//可以调用构造方法
t.fangfa("suncity");
}

}
//只是简单的例子很难把JAVA的内容给体现出的