The code you provided is a Java program that uses the java.time package to add 10 hours to the current local time and print the result. Here is a breakdown of the code:
Note that the string "Time After 2 Hours : " in the System.out.println() method should be changed to "Time After 10 Hours : " to accurately reflect the added time.
import java.time.*; public class Add_Hours { public static void main(String[] args) { LocalTime y = LocalTime.now(); LocalTime nt = y.plusHours(10); System.out.println("Time After 2 Hours : " + nt); } }
Time After 2 Hours : 23:53:02.303817200
Learn All in Tamil © Designed & Developed By Tutor Joes | Privacy Policy | Terms & Conditions