Learn JAVA #15

Java Classes/Objects Java is an object-oriented programming language. Everything in Java is associated with classes and objects, along with its […]

Learn JAVA #14

Java Methods A method is a block of code which only runs when it is called. You can pass data, known as parameters, […]

Learn JAVA #13

Java Switch Statements Instead of writing many if..else statements, you can use the switch statement. The switch statement selects one of many code blocks to be executed: […]

Learn JAVA #12

Java If … Else Java Conditions and If Statements Java supports the usual logical conditions from mathematics: Less than: a < b […]

Learn JAVA #11

Java Booleans Very often, in programming, you will need a data type that can only have one of two values, […]

Learn JAVA #10

Java Math The Java Math class has many methods that allows you to perform mathematical tasks on numbers. Math.max(x,y) The Math.max(x,y) method can […]

Learn JAVA #9

Java Strings Strings are used for storing text. A String variable contains a collection of characters surrounded by double quotes: Example Create […]

Learn JAVA #8

Java Type Casting Type casting is when you assign a value of one primitive data type to another type. In Java, […]

Learn JAVA #6

Java Variables Variables are containers for storing data values. In Java, there are different types of variables, for example: String – stores text, […]

Learn JAVA #5

Java Comments Comments can be used to explain Java code, and to make it more readable. It can also be […]