一,总结
一.使用java理解程序逻辑
1.java的环境变量
2.java的编程规范
3.导入JDK
二,上机练习
1.public class Qw {
public static void main(String[] args){
/*输出介绍的信息*/
System.out.println("大家好!我是王宁,非常热爱Java程序");
}
}
2.public class Al2 {
public static void main(String[] args){
/*输出介绍的信息*/
System.out.print("你好,我是青鸟学员");
System.out.print("\n姓名:爱边成");
System.out.print("\n年龄:20岁");
System.out.print("\n爱好:打篮球");
}
}
3.public class Al3 {
public static void main(String[] args){
/*输出介绍的信息*/
System.out.println("\t\t购物清单");
System.out.print("商品名称");
System.out.print("\t\t购买数量");
System.out.print("\t\t商品单价");
System.out.print("\t\t金额");
System.out.print("\n鳄鱼夹克");
System.out.print("\t\t1");
System.out.print("\t\t1900");
System.out.print("\t\t1900");
System.out.print("\nipodMP4");
System.out.print("\t\t1");
System.out.print("\t\t400");
System.out.print("\t\t800");
}
}
4.public class Al4 {
public static void main(String[] args){
System.out.println("\t\t欢迎使用我行我素购物管理系统");
System.out.print("\n\n");
System.out.print("\t\t1.登录系统");
System.out.print("\n\n\n");
System.out.print("\t\t2.退出");
System.out.print("\n\n\n");
System.out.print("******************************************************************************************");
System.out.print("\n");
System.out.print("请选择,输入数字");
}
}
5.public class Al5 {
public static void main(String[] args){
System.out.println("\t\t欢迎使用我行我素购物管理系统");
System.out.print("\n");
System.out.print("******************************************************************************************");
System.out.print("\n\n");
System.out.print("\t\t1.客户信息管理");
System.out.print("\n\n\n");
System.out.print("\t\t2.购物结算");
System.out.print("\n\n\n");
System.out.print("\t\t3.真情回馈");
System.out.print("\n\n\n");
System.out.print("\t\t4.注销");
System.out.print("\n\n");
System.out.print("******************************************************************************************");
System.out.print("\n\n");
System.out.print("请选择,输入数字");
}
}
6.public class Al6 {
public static void main(String[] args){
System.out.println("姓名:汪洋");
System.out.println("年龄:21");
System.out.println("性别:男");
System.out.println("职业:学生。");
System.out.println("住址:北京市上地西里X号楼X单元X号。");
System.out.println("电话:13612345678");
}