符合中小企业对网站设计、功能常规化式的企业展示型网站建设
本套餐主要针对企业品牌型网站、中高端设计、前端互动体验...
商城网站建设因基本功能的需求不同费用上面也有很大的差别...
手机微信网站开发、微信官网、微信商城网站...
public class Student {
创新互联建站主营襄垣网站建设的网络公司,主营网站建设方案,App定制开发,襄垣h5微信小程序开发搭建,襄垣网站营销推广欢迎襄垣等地区企业咨询
private String name;
private String number;
private int score;
public Student() {
}
public Student(String name, String number, int score) {
super();
this.name = name;
this.number = number;
this.score = score;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public String getNumber() {
return number;
}
public void setNumber(String number) {
this.number = number;
}
public int getScore() {
return score;
}
public void setScore(int score) {
this.score = score;
}
public String toString() {
return "Name: " + name
+ ",Number: " + number
+ ",Score : " + score;
}
//调用方法
public static void main(String[] args) {
Student s = new Student("Jack","123456",98);
System.out.println(s.toString());
}
}
运行结果:
Name: Jack,Number: 123456,Score : 98
下面是一个java 小程序实现的\x0d\x0aimport java.awt.*;//引入包\x0d\x0aimport java.applet.Applet;//引入包\x0d\x0apublic class Output extends Applet//定义类\x0d\x0a{\x0d\x0a //定义变量\x0d\x0a private String name;\x0d\x0a private int num;\x0d\x0a //初始化\x0d\x0a public void init()\x0d\x0a {\x0d\x0a name = getParameter("vname");\x0d\x0a num = Integer.parseInt(getParameter("vnum"));\x0d\x0a }\x0d\x0a //输出\x0d\x0a public void paint(Graphics g)\x0d\x0a {\x0d\x0a g.drawString ("姓名:"+name+";学号:"+num,20,30);\x0d\x0a }\x0d\x0a}\x0d\x0a\x0d\x0a相应的html文件\x0d\x0a\x0d\x0a\x0d\x0a\x0d\x0a\x0d\x0a\x0d\x0a
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
public class Test222 {
public static void main(String[] args) throws IOException {
int i, j;
String a;
BufferedReader str = new BufferedReader(
new InputStreamReader(System.in));
System.out.println("请输入学号:");
a = str.readLine();
System.out.println("学号为:" + a);
str = new BufferedReader(new InputStreamReader(System.in));
System.out.println("请输入姓名:");
a = str.readLine();
System.out.println("姓名为:" + a);
}
}
望采纳~~
这个比较简单,我说一下方法,你打开eclipse,新建一个项目,然后在src里面新建一个学生类,后面的一步一步走,那步不懂就问