
Learn to code quickly while having fun.
Print to the console.
Data Types and Variables
Optional code using if-else decisions
We resist doing the same things many times, however, learn to get Java JVM to execute code repeatedly. With a for-loop, this is easy!
Do it over and over. While loops are easy too.
Interact with the end-user. Get user input using the Scanner class.
(Almost) All about Arrays.
What is an array and how to create or declare an array. Assign initial values to an array.
Find out how to determine the length of an array, i.e. how many values are stored in an array. Use this value as an integer.
How do I refer to or access individual values in an array.
Inspect all the values in an array by using a for loop.
Once I have values in an array, how do I locate a particular value? E.g. Is the value "cat" in my array?
What is I need to replace or update a value? How do I update a value in an array?
If I have 2 arrays, how do I comare them to find out of they have exactly the same values?
Now that you have viewed the videos of section 2, sit back and relax and see how you could combine the techniques to create the Hangman Game. If you feel it is necessary, section 4 has more about arrays. Try on your own to create a better solution. Have fun :)
Code the Hangman Game in Java. Learn programming basics with the Java Beginners Course.
This is a super easy course to give you the basics of programming in Java.
The essential concepts of Java are here, all in this course, with a really fun and easy example of the Hangman Game.
We learn about data types like String, int, boolean, double, and char.
We learn about variables in programming.
Then we learn all about repeating coding blocks using the famous for loops and while loops.
We also cover decisions in Java, like if-else statements.
Arrays and a few of the major methods that we use with arrays.
Declaring arrays
Looping arrays
Indexing and retrieving array values
Finding a specific value
Comparing arrays
We keep all the videos brief and to the point, and they are short and easy.
We then put all the techniques together to give you an idea of how you could use the techniques to do something useful, such as create a game.
Of course you could practice the code and create much more interesting solutions to this game. This is your challenge!
Java is a very comprehensive coding language, and there is, of course, a lot more to learn. This course provides a good start, and we hope that we will see you soon for further courses.