Java Variables

Inside of a method, like our main method, we might want to create some variables for use. Java gives us numerous primitive data types that we can use, and within a method, we declare and use them, just like we would in C/C++. Comments You might have noticed the comment above. Comments in Java are…

Java’s main Method

Just like in C++, each executable Java project should have a main method. This isn’t just the “main” method that is run, but an actual method called main(). If you look at the previous page for creating a file, we can start from there. This will be a little different from the C++ main method,…