Print the correct Instant unit

Report a typo

Implement the subtractFromEpoch() method to subtract the given days from the EPOCH and print the result in the given time zone.

Sample Input 1:

10
Asia/Yerevan

Sample Output 1:

1969-12-22T04:00+04:00[Asia/Yerevan]
Write a program in Java 17
import java.util.Scanner;
import java.time.*;
import java.time.temporal.ChronoUnit;

public class Main {
public static void main(String[] args) {
Scanner scanner = new Scanner(System.in);

subtractFromEpoch(scanner.nextInt(), scanner.next());
}

public static void subtractFromEpoch(int days, String zone) {

}
}
___

Create a free account to access the full topic