Created
December 5, 2017 15:01
-
-
Save spaghettiSyntax/a4d57095b9698bac7683b0bf837a2d9a to your computer and use it in GitHub Desktop.
Think Java code snippets.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class Date { | |
public static void main(String[] args) { | |
String day, month; | |
int date, year; | |
day = "Friday"; | |
date = 13; | |
month = "July"; | |
year = 2015; | |
System.out.println("American format:"); | |
System.out.print(day); | |
System.out.print(", "); | |
System.out.print(month); | |
System.out.print(" "); | |
System.out.print(date); | |
System.out.print(", "); | |
System.out.println(year); | |
System.out.println("European format:"); | |
System.out.print(day); | |
System.out.print(" "); | |
System.out.print(date); | |
System.out.print(" "); | |
System.out.print(month); | |
System.out.print(" "); | |
System.out.println(year); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment