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.
In this lesson we learn about why we need variables. We declare a string variable, assign value to the variable, output the variable to the screen and also find out how many characters are in the variable.
In this tutorial you learn how to install the Eclipse IDE for programming Java. We also write, compile and execute our first program in Java to print a message to the screen.