构造方法出现问题,去解决方法!!! 谢谢了

 

package tenthChapter.work;

public class Time {
	private int hour;
	private int minute;
	private int second;
	
	//construct a default Time
    public Time() {
		this.hour = (int)((System.currentTimeMillis() / 1000 / 60 / 60) \ 24);
		this.minute = (int)((System.currentTimeMillis() / 1000 / 60) \ 60);
		this.second = (int)((System.currentTimeMillis() / 1000 ) \ 60);
	}
	//construct a Time by millisecond
	public Time(long millisecond) {
		this.hour = (int)((millisecond / 1000 / 60 / 60) \ 24);
		this.minute = (int)((millisecond / 1000 / 60) \ 60);
		this.second = (int)((millisecond / 1000 ) \ 60);
	}
	//construct a Time with hour, minute and second
	public Time(int hour, int minute, int second) {
		this.hour = hour;
		this.minute = minute;
		this.second = second;
	}
	public int getHour() {
		return hour;
	}
	public int getMinute() {
		return minute;
	}
	public int getSecond() {
		return second;
	}
	public void setTime(long elapseTime) {
		this.hour = (int)((elapseTime / 1000 / 60 / 60) \ 24);
		this.minute = (int)((elapseTime / 1000 / 60) \ 60);
		this.second = (int)((elapseTime / 1000 ) \ 60);
	}
	public void setHour(int hour) {
		this.hour = hour;
	}
	public void setMinute(int minute) {
		this.minute = minute;
	}
	public void setSecond(int second) {
		this.second = second;
	}

}

Description    Resource    Path    Location    Type
Syntax error on token "Invalid Character", invalid AssignmentOperator    Time.java    /javaClass/tenthChapter/work    line 10    Java Problem
Syntax error on token "Invalid Character", invalid AssignmentOperator    Time.java    /javaClass/tenthChapter/work    line 11    Java Problem
Syntax error on token "Invalid Character", invalid AssignmentOperator    Time.java    /javaClass/tenthChapter/work    line 12    Java Problem
Syntax error on token "Invalid Character", invalid AssignmentOperator    Time.java    /javaClass/tenthChapter/work    line 16    Java Problem
Syntax error on token "Invalid Character", invalid AssignmentOperator    Time.java    /javaClass/tenthChapter/work    line 17    Java Problem
Syntax error on token "Invalid Character", invalid AssignmentOperator    Time.java    /javaClass/tenthChapter/work    line 18    Java Problem
Syntax error on token "Invalid Character", invalid AssignmentOperator    Time.java    /javaClass/tenthChapter/work    line 36    Java Problem
Syntax error on token "Invalid Character", invalid AssignmentOperator    Time.java    /javaClass/tenthChapter/work    line 37    Java Problem
Syntax error on token "Invalid Character", invalid AssignmentOperator    Time.java    /javaClass/tenthChapter/work    line 38    Java Problem
The left-hand side of an assignment must be a variable    Time.java    /javaClass/tenthChapter/work    line 10    Java Problem
The left-hand side of an assignment must be a variable    Time.java    /javaClass/tenthChapter/work    line 11    Java Problem
The left-hand side of an assignment must be a variable    Time.java    /javaClass/tenthChapter/work    line 12    Java Problem
The left-hand side of an assignment must be a variable    Time.java    /javaClass/tenthChapter/work    line 16    Java Problem
The left-hand side of an assignment must be a variable    Time.java    /javaClass/tenthChapter/work    line 17    Java Problem
The left-hand side of an assignment must be a variable    Time.java    /javaClass/tenthChapter/work    line 18    Java Problem
The left-hand side of an assignment must be a variable    Time.java    /javaClass/tenthChapter/work    line 36    Java Problem
The left-hand side of an assignment must be a variable    Time.java    /javaClass/tenthChapter/work    line 37    Java Problem
The left-hand side of an assignment must be a variable    Time.java    /javaClass/tenthChapter/work    line 38    Java Problem
 

查看全部
weixin_51428338
纬度打击
2020/12/02 18:47
  • java
  • eclipse
  • 点赞
  • 收藏
  • 回答
    私信
满意答案
查看全部

1个回复