•
Definition:Arithmetic Operations is just like it sounds, you can perform the operations on numerical values as well as numerical variables. Syntax:First, let’s see what it looks like when directly printing to console. Now let’s take a look at the Arithmetic Operations using and storing them in a variables. We can also declare two numbers…
•
Definition:Concatenation is the process of combining any and all of data types (strings, integers, doubles or floats, chars, a even a boolean). Syntax:Here is some examples of how concatenation works and when to use it: Homework:Heres a little homework that you can try on your own, try to complete it without looking for help,…
•
Definition:Boolean data type only holds two values, either true or false. Syntax: Application:Boolean can be used in variety of cases, for example, when you need to check if one value is bigger then the other, which will return you a true or falls. Let’s break it down and see what actually happens when boolean…
•
Definition:Char data type holds only single character value, for example: ‘a’ or ‘A’ or ‘@’ etc. Syntax: Note that char data type must be surrounded by single quotes.
•
Definition:Double and Float both are numerical data type which holds positive or negative with decimal points. Difference:Float – is suited for up to 7 decimal pointsDouble – is suited for up to 15 decimal points Let’s see an example:
•
Definition:Integer is a numerical data type which holds only whole numbers: 1, 2, 3, 4… etc. either positive or negative. Break it down to smaller pieces:int – is a variable type integer which holds only whole numbers. (integer will not accept decimal points)variableName – is the name you give to the variable.quotation marks ” “ – note…
•
What Is a String in Java? In Java, a string is an object that represents a sequence of characters. Unlike primitive types (like ‘int’ or ‘char’), strings are objects of the ‘String’ class, which belongs to the ‘java.lang’ package. Strings in Java are immutable, meaning that once a ‘String’ object is created, its value…