0 0
Read Time:17 Second

Java Program to print LocalTime HH:mm:ss

import java.time.LocalTime;
import java.time.format.DateTimeFormatter;
class Local_Time
{
	public static void main(String Args[])
	{
		String t;
		LocalTime lt = LocalTime.now();
		DateTimeFormatter formatterLocalTime = DateTimeFormatter.ofPattern("HH:mm:ss");
		t = formatterLocalTime.format(lt);
		System.out.println("HH:mm:ss = " + t);
	}
}

Output:

HH:mm:ss = 12:38:04
Happy
Happy
0 %
Sad
Sad
0 %
Excited
Excited
0 %
Sleepy
Sleepy
0 %
Angry
Angry
0 %
Surprise
Surprise
0 %

Average Rating

5 Star
0%
4 Star
100%
3 Star
0%
2 Star
0%
1 Star
0%

One thought on “Write a Java program to print LocalTime HH:mm:ss

  1. Wow, superb blog format! How long have you been blogging for?
    you make running a blog glance easy. The total glance of your web site is great, as well

Leave a Comment