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.
Month: October 2019
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.
In this tutorial we show you how to download and install the latest Java Development Kit (JDK) and also set the system environment variables in Windows to make it work.
In this lesson we talk about what the HAVING clause means (adding a condition for the output of the aggregate function when the GROUP BY clause is used), and we also talk about how to update particular values in a row using the UPDATE clause.