What is a data field?
<p>I am supposed to Modify the Time2 class (below) to implement the time as the number of seconds since midnight. The class  should have one data field (an int  with the number of seconds since midnight) instead of three. This change should not affect the arguments , behavior , or output  of the public methods .</p>

<p>And then create a Driver class  with a main method  to test your Time2 class . This program  should ask the user to input the number of hours, minutes, and seconds past midnight, creating a Time2 object  and using the mutator methods . The program  should then use the toString() method  to print out the time.</p>

<p>My question is what part of the code below is the data field? </p>

<pre><code>import java.util.Scanner;

public class Driver {

public static void main(String[] args) {

    Scanner input = new Scanner(System.in);

    Time2 time = new Time2();

    System.out.print("Enter hours:");
    int hours = input.nextInt();                                
    System.out.print("Enter minutes:"); 
    int minutes = input.nextInt();                              
    System.out.print("Enter seconds:"); 
    int seconds = input.nextInt();

    time.setSecond(seconds);    
    System.out.println(time.toString());
}

public static class  Time2 {

private  int  hour; 
private  int  minute;
private  int  second;   

public Time2() {this(0, 0, 0);}
public Time2(int  hour) {this(hour, 0, 0);}
public Time2(int  hour, int  minute) {this(hour, minute, 0);}

public Time2(int  hour, int  minute, int  second) {
    if(hour&lt;0||hour&gt;=24)
        throw new IllegalArgumentException("hour must be 0-23");
    if (minute &lt; 0 || minute &gt;= 60)
        throw new IllegalArgumentException("minute must be 0-59");
    if (second &lt; 0 || second &gt;= 60)
        throw new IllegalArgumentException("second must be 0-59");
    this.hour = hour;
    this.minute = minute;
    this.second = second;
}

public Time2(Time2 time) {this(time.getHour(), time.getMinute(), time.getSecond());}

public void setTime(int  hour, int  minute, int  second) {
    if (hour&lt;0||hour&gt;=24)
        throw new IllegalArgumentException("hour must be 0-23");
    if (minute &lt; 0 || minute &gt;= 60)
        throw new IllegalArgumentException("minute must be 0-59");
    if (second &lt; 0 || second &gt;= 60)
        throw new IllegalArgumentException("second must be 0-59");
    this.hour = hour;
    this.minute = minute;
    this.second = second;
}

public void setSecond(int  second) {
    if (second &lt;= 0 || second &gt; 60)
        throw new IllegalArgumentException("second must be 0-59");
    this.second = second;
}

public int  getHour() {return second/60/60;}
public int  getMinute() {return second/60;}
public int  getSecond() {return second;}

public String  toUniversalString() {
    return String.format( "%02d:%02d:%02d", getHour(), getMinute(), getSecond());
}

public String  toString() {
    return String.format("%d:%02d:%02d %s",
                          ((getHour() == 0 || getHour() == 12) ? 12 : getHour() % 12), getMinute(),
                          getSecond(), (getHour() &lt; 12 ? "AM" : "PM"));
}
}
}
</code></pre>

<p>~UPDATE~ I got the code to work, the only problem with it is that it displays to wrong hours and minute(see output link)
<a href="https://i.stack.imgur.com/KcYmx.png" rel="nofollow noreferrer">output</a></p>