Press "Enter" to skip to content

Posts published in April 2017

Overloading Operators in Java

As with many programming languages such as C, C++ and C# (known commonly as the C family), it is possible to “overload methods” (sometimes called functions if not used in classes, such as C) in order to take a different amount of parameters so that they can be used in…

Comparing Objects in Java – “==”, “equals()”, “compareTo()” and “compare()

Java has a few different ways of comparing variables and objects with one another. “==”, “equals()”, “compareTo()” and “compare()”. Java provides various operators such as ‘==’ and ‘!=’ which check for equality and inequality respectively. They are used in a programming flow to check if certain criteria match or are…

Java data types

In Java there are eight basic data types; which are: byte, short, int, long, float, double, boolean and char. It could realistically be said that a Java developer’s time is primarily spent using these particular variable types to store, retrieve and manipulate data to complete most programming tasks. However, there…