forked from AllenDowney/ThinkJavaCode
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathData.java
More file actions
27 lines (20 loc) · 614 Bytes
/
Data.java
File metadata and controls
27 lines (20 loc) · 614 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
/**
* Examples from Chapter 2.
*/
public class Data {
public static void main(String[] args) {
//Variables Declard for public class "Data"
String day, month, amer, euro;
int date, year;
//Data assigned to Variables
day = "Tuesday";
date = 7;
month = "February";
year = 2017;
//Date formations
amer = day + ", " + month + " " + date + ", " + year;
euro = day + " " + date + " " + month + " " + year;
System.out.println(amer);
System.out.println(euro);
}
}