java代码写看看呗 java怎么看代码

给段最简单的java代码让我新手看一下最简单的java代码肯定就是这个了,如下:
public class MyFirstApp
{
public static void main(String[] args)
{
System.out.print("Hello world");
}
}
“hello world”就是应该是所有学java的新手看的第一个代码了 。如果是零基础的新手朋友们可以来我们的java实验班试听,有免费的试听课程帮助学习java必备基础知识,有助教老师为零基础的人提供个人学习方案,学习完成后有考评团进行专业测试,帮助测评学员是否适合继续学习java,15天内免费帮助来报名体验实验班的新手快速入门java,更好的学习java!
Java帮我写下代码~项目结构如下:
代码如下
package main;
public class Course {
private String classNum;
private String credit;
private String startClassDate;
private String endClassDate;
private String teacher;
private String assessment;
public String getClassNum() {
return classNum;
}
public void setClassNum(String classNum) {
this.classNum = classNum;
}
public String getCredit() {
return credit;
}
public void setCredit(String credit) {
this.credit = credit;
}
public String getStartClassDate() {
return startClassDate;
}
public void setStartClassDate(String startClassDate) {
this.startClassDate = startClassDate;
}
public String getEndClassDate() {
return endClassDate;
}
public void setEndClassDate(String endClassDate) {
this.endClassDate = endClassDate;
}
public String getTeacher() {
return teacher;
}
public void setTeacher(String teacher) {
this.teacher = teacher;
}
public String getAssessment() {
return assessment;
}
public void setAssessment(String assessment) {
this.assessment = assessment;
}
@Override
public String toString() {
return " 课程号:" + classNum + ", 学分:" + credit
+ ", 上课时间:" + startClassDate + ", 下课时间:"
+ endClassDate + ", 教师:" + teacher + ",考核方式:"
+ assessment + "";
}

}
package main;
import java.io.BufferedInputStream;
import java.io.BufferedReader;
import java.io.File;
import java.io.FileInputStream;
import java.io.InputStreamReader;
import java.math.BigDecimal;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import java.util.Scanner;
public class Main {
public static void main(String[] args) throws Exception {
Scanner sc = new Scanner(System.in);
System.out.println("创建学生请输入姓名:");
Student stu1 = new Student();
stu1.setName(sc.nextLine());
Scanner sc1 = new Scanner(System.in);
System.out.println("创建学生请输入学号:");
stu1.setNumber(sc1.nextLine());
System.out.println("请选择课程,课程如下:");
ListCourse list2 = new ArrayListCourse();
stu1.setCourses(list2);
ListCourse list = readTxt();
for (Course course : list) {
System.out.println(course.toString());
}
for (int i = 1; i5; i++) {
System.out.println("请输入第"+i+"个课程号:");
//输入第一个课程号
list2 = handleClass(list, list2);
System.err.println("已选择成功!");
list = notSelectClass(list, list2);
System.out.println("请选择课程,课程如下:");
if(i==4){
break;
}
for (Course course : list) {
System.out.println(course.toString());
}
}
System.out.println("课程已选完!结果如下:");
System.err.println("学生:"+stu1.getName()+":");
for (Course course : list2) {
System.err.println(course.toString());
}

推荐阅读