-1
"互換性のない型String []を文字列に変換できません"配列にデータを入力できません
私は間違っていますか?
public class TimeCard {
private int employeeNum;
private String[] clockInTimes = new String[14];
private String[] clockOutTimes = new String[14];
private float[] decimalClockIn = new float[14];
private float[] decimalClockOut = new float[14];
private float[] timeElapsed = new float[14];
public String getClockInTimes()
{ //im getting the error here
return clockInTimes;
}
public void setClockInTimes(String[] value)
{ //getting the error here
clockInTimes = value;
}
}
アップデートすると、配列内に文字列を入力することはできません。
私はこのようにそれをやろうとしている:
public class TestTimeCard {
/**
* @param args the command line arguments
*/
public static void main(String[] args) {
Scanner reader = new Scanner(System.in);
TimeCard josue = new TimeCard();
System.out.println("Enter Monday Clock In Times:");
josue.setClockInTimes(reader.next());
}
}
ありがとう!私はあなたがそれを言ったようにそれを修正した、それは誤りを示さない。 –
回答としてマークしてください。 –