Answered step by step
Verified Expert Solution
Question
1 Approved Answer
java Exercise 2.2 The point of this exercise is (1) to use string concatenation to display values with different types (int and String), and (2)
java
Exercise 2.2 The point of this exercise is (1) to use string concatenation to display values with different types (int and String), and (2) to practice developing programs gradually by adding a few statements at a time. 1. Create a new program named Date.java. Copy or type in something like the Hello World program and make sure you can compile and run it. 2. Following the example in Section 2.4, write a programythat creates vari- ables named day, date, month, and year. The variable day will contain the day of the week (like Friday), and date will contain the day of the month (like the 13th). Assign values to those variables that represent today's date. 32 Chapter 2 Variables and Operators 3. Display the value of each variable on a line by itself. This is an interme- diate step that is useful for checking that everything is working so far. Compile and run your program before moving on. 4. Modify the program so that it displays the date in standard American format; for example: Thursday, July 18, 2019. 5. Modify the program so it also displays the date in European format. The final output should be as follows: American format: Thursday, July 18, 2019 European format: Thursday 18 July 2019 Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started