ACTIVITY 1.2

In this activity you will explore data types and the values
used to initialise them. You will also explore them being
displayed on the screen.

1. 	As before, open Visual Studio Code by double-clicking its
	icon on the desktop, or by selecting it from the application
	menu.
	
2.	Your instructor will have given you the path to a folder
	containing the course exercises. It will be something like
	Documents\Course\1.2. From the main menu bar, select
	File | Open folder... then in the folder search dialog
	that appears, navigate to the folder your instructor
	gave you. Click 'Select folder' to open the folder.

3.	In the Explorer bar at the left of the screen, Click
	the 'src' folder, then click the 'App.java' file to
	open it.

4.	Make sure the App.java tab is selected at the top of the
	window, if you get a Java overview window hiding App.java.

5.  Type in the code from page 12 of your course notes. this
    should give you a program that tries out several data types
    and literal values.

6.  Beneath the line that assigns the character 'W' into the
    variable called c, add several System.out.println lines
    that display the values of some of the variables.

    HINT: To display the value of variable f when the program
    is run, use the line of code:

    System.out.println("The value of f is " + f);

7.  Create a new terminal window at the bottom of the VS Code
    main window and change directory to the src folder. (See
    the instructions for Activity 1.1 if you can't remember
    how to do this.)

8.  Compile and run your java program.

    Do you see the output of your program as expected?

    Are the values for the variables correct?

    Are the values exactly the same as they appeared in
    the code you wrote?

9.  Now add the two blocks of code from page 13 beneath your
    System.out.println lines, and compile and run the
    program again.

    Do you see the expected output from the extra lines of code?

IF YOU HAVE TIME ...

10. What is different if you change 'println' to 'print'?
    Modify your program to find out.

11. What happens if you change one of your println lines to:

    System.out.println("The mystery value is " + f + l);

12. What happens if you then change this line to:

    System.out.println("The mystery value is " + (f + l));

    Can you explain this?

13. Find your line containing:

    String str = "I use double quotes";

14. Change it to:

    String str = "I use" + " double quotes";

    then compile and run your program. Is your
    output from the program any different?

15. What happens if you change the line to:

    String str = "I use + double quotes";

16. What happens if you change the line to:

    String str = "I use \" + \" double qoutes";

    What have the backslash (\) characters done?

YOU HAVE FINISHED!
