In this tutorial we show you how to make a HTML5 game you can play in your browser using Construct 2, which is a game making program you can use to export what you have made into HTML5. Make sure you check out all the legal stuff to do with using the software (licences) before …
In this tutorial we start off with explaining a few more methods in the JFrame class. Then we created our own JButton object and added it to the content panel of our JFrame.
In this tutorial we’re going to learn how to write programs in Java using Eclipse and the GUI (Graphical User Interface) classes that are part of the Java Cass Library. The first class which we’re using to create a window is called JFrame.
In this lesson you are shown how to create an array to refer to objects of the same class. We then use this array in our greedy pig game.
In this tutorial we show you how to implement a for loop. We also explain to you why sometimes the numbers are automatically rounded in java and how to prevent it.
Currently we have a lot of code in the main method. The only thing you should have in main is to create an object and to run a method with that object. Remember Java is an object oriented programming language.
In this lesson we use a while loop to repeat calling a method until a condition is met. We also show you how to increment the value in a variable as well as how to output to the screen a string and an integer variable.
In this lesson we show you how to create your own object by firstly making a new class, then making an object from that class. We then show you how to call a method on that object.
In this tutorial we learn how to generate a random decimal number between 0 and 1, we then learn how to convert it to a random integer between 1 and 6, similar to rolling a die.
In this lesson we declare an integer variable, assign a value to it, then use an If/else statement to decide what to output to the screen based on evaluating the contents of the variable using a comparison operator.