java how to get current date
import java.time.format.DateTimeFormatter;
import java.time.LocalDateTime;
public class CurrentDateTimeExample1 {
public static void main(String[] args) {
DateTimeFormatter dtf = DateTimeFormatter.ofPattern("yyyy/MM/dd HH:mm:ss");
LocalDateTime now = LocalDateTime.now();
System.out.println(dtf.format(now));
}
}
Also in Java:
- funzione random in java
- formatting an integer in java
- java substring
- android elevation not working
- java int passed by reference
- string contains java
- how to create a button in java
- equls en java
- java file path linux
- isSelfDivisor java
- check if a list contains a string java
- get current unix timestamp java
- java stream sorted reverse
- java random between two strings
- how to select a element in an arraylist java
- java how to call getReader twice
- java output array lists to file
- java throws multiple exceptions
- java identifiers
- java lerp
- Spigot API inventory close
- check if a char is a space java
- get raondom from array java
- java - get open ports