how can i make it work? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

how can i make it work?

import java.text.SimpleDateFormat ; import java.util.Date; public class Main{ public static void main(String[] args){ Date date = new Date(); SimpleDateFormat sd = new SimpleDateFormat ("yyyy"); String xd = sd.format (date); int year = 2020; if (xd > year){ System.out.println("You are from the future XD"); } } }

4th Jun 2020, 2:55 PM
Yahel
Yahel - avatar
1 Answer
0
This date format will not work i think, but im not quite sure
4th Jun 2020, 4:50 PM
Grzesiek Sikorski
Grzesiek Sikorski - avatar