package demo2;

public class VariableDemo1 {

    public static void main(String[] args) {
        /* ⁡⁣⁡⁢⁣⁢<-⁡ ⁡⁢⁣⁢Click on the little > arrow to the right of the line number ⁡!⁡
         * 
         * This is a comment! Comments are ignored by the compiler and are
         * areas where we can write notes to ourselves. In java, there are two
         * kinds of comments. There is a multi-line comment like this one that
         * we contain using a / followed by a * at the beginning and a *
         * followed by a / at the end. These comments can span multiple line
         * breaks.
         * 
         * If you have set VSCode up as recommended in this course, these
         * multi-line comments will always be collapsed when you open your
         * files. ⁡⁢⁣Just click on the arrow to expand them!
         */

        // This is also a comment in Java.
        // This is known as a single-line comment.
        // Any characters after the // are considered comments until the
        // line break. Notice that none of my lines of code go beyond
        // column 80. That is an industy standard that you should
        // always follow. DO NOT use word-wrap: you have to use a
        // "hard return" (press ENTER) as you get close to column 80.
        // You can add a solid vertical line (called a "rule")
        // to help you determine when to add your hard-return.
        // See the Discusson board in SLATE for instructions.

        /*
         * Here's a useful trick. We can use CTRL+/⁡⁡ to toggle a
         * single-line comment on and off. Try it on one of the
         * lines up above. If you press CTRL and the / key,
         * VSCode will remove the // at the beginning of the line.
         * If you press CTRL+/⁡⁡ again, it will toggle it back
         * into a comment.  Sadly, it doesn't work on multi-line
         * comments :(
         */

        /*
         * now let's look at some actual code:
         * (if your code gets messy, right-click anywhere in the
         * editor window and select "Format Document")
         */

        // numPets is a v͟a͟r͟i͟a͟b͟l͟e - variables hold data
        // "int" means it only holds +/- whole numbers
        int numPets = 1; // replace 1 with the # of pets you have
        System.out.println(numPets); // prints the contents of numPets

        // you adopt a new pet, let's add one
        // (uncomment this next line during the demo in class)
        // numPets++;

        // ++ means "add one to the existing value"
        // (yes, that's how C++ got its name!)

        // now let's see what numPets says:
        // (uncomment this next line during the demo in class)
        // System.out.println(numPets); // prints the contents of numPets

        // let's display a sentence about the number of pets:
        // (uncomment these next 2 lines during the demo in class)
        // System.out.println("I have this many pets:");
        // System.out.println(numPets);
        // (String literals must go inside "double-quotes" in Java;
        //  'single quotes' and backticks don't work on String literals)

        // how are these statements different from the previous ones?
        // (uncomment these next 2 lines during the demo in class)
        // System.out.print("I have this many pets:");
        // System.out.print(numPets);
        // after you do the next demo, you might want to 
        // change this last print() to println()!  You'll see...

        // this way is much easier and much more efficient:
        // (uncomment this next line during the demo in class)
        // System.out.println("I have this many pets: " + numPets);

        /*
         * The + operator means "concatenate" when you place it between 
         * two strings.  It "glues" the two strings together, just as 
         * they are (it won't add extra spaces or anything).
         */

        /*
         * Try this: write a new println() statement that displays
         * I have X pets.
         * (where X is the contents of your numPets variable)
         * Make sure it looks nice - there should be a space around the #.
         */
        






         
        /* Solution:
         * System.out.println("I have " + numPets + " pets.");
         */

    }
}
