How do I get today's date to print to the console in Java (2018)? [on hold]
Clash Royale CLAN TAG #URR8PPP How do I get today's date to print to the console in Java (2018)? [on hold] I know this question has been asked a lot, but I've tested code from hundreds of posts about this, and none of it is working for me. I want to print something like this: Today's date is: 07/29/2018 Day of Week: Sunday Here is the code I am currently testing: package javaDemo; import java.time.LocalDateTime; import java.time.format.DateTimeFormatter; public class TodaysDate { public static void main(Stringargs) { System.out.println("Today's date is: "+DateTimeFormatter.ofPattern("MM/dd/yyyy").format(LocalDateTime.now()) + " Day of Week: "+LocalDateTime.now().getDayOfWeek()); } } This question appears to be off-topic. The users who voted to close gave this specific reason: "but I've tested code from hundreds of posts about this, and none of it is working for me." - like what code? ...