programmazione-java/src/Time/Test.java

17 lines
436 B
Java
Raw Normal View History

2016-10-19 16:43:43 +00:00
import java.util.Scanner;
public class Test{
public static void main(String [] args){
Time t = new Time(12, 50, "am");
Time t2 = new Time(1, 1, "pm");
Scanner sc = new Scanner(System.in);
t.shift(sc.nextInt(), sc.nextInt());
t.print(System.out);
if(t.isAfter(t2))
System.out.println("t viene prima");
else
System.out.println("t viene dopo");
}
}