Tag Java Programming

Java Interfaces

java image

We’ll cover the following What is an interface in Java? Abstract,default and static methods in Interfaces Implementing Interfaces Evolving Interfaces with default methods Multiple inheritance of methods Functional Interfaces What is an interfaces in Java? An interfaces is a type…

Base Java Language Structure

java image

We’ll cover the following Class Object Package Inheritance Object as Superclass Exception Handling in Java Checked Exceptions Runtime Exceptions Class A class is a template that describes the data and behavior associated with an instance of that class. A class…

Java Cheatsheet

java image

During your Java development time, you will be asked to do certain things, like creating a local variable. The following can be used as a reference for such tasks, so that you how what you have to do. Basics Basic…

Java Left and Right Shift Operator

java image

We’ll cover the following Java Left Shift Operator Java Right Shift Operator Java Left Shift Operator The left shift operator, <<, shifts all of the bits in a value to the left a specified number of times. It has this…

Java Bitwise Operators

java image

We’ll cover the following Bitwise Operators Bitwise Logical Operators Bitwise NOT Bitwise AND The Bitwise OR Bitwise XOR Example Bitwise Operators Java defines several bitwise operators which can be applied to the integer types, long,int, short, char, and byte. These…

Java Arithmetic Operators

java image

We’ll cover the following Arithmetic Operators The Modulus Operator Arithmetic Assignment Operators Increment and Decrement Java provides a rich operator environment. Most of its operators can be dividedinto the following four groups: arithmetic, bitwise, relational, and logical. Java alsodefines some…

Java Math Class

java image

We’ll cover the following Math class Math class constants Java mathematical functions Examples Math class Java’s built-in operators are useful, but they cannot provide all the mathematical needs of most Java programmers. We can use Java Math class to do…

Java String and String Literals

java image

We’ll cover the following Strings Declaring and initializing strings Example Java strings combination Note Java Converting primitives to strings Converting strings to primitives String Literals A String is a sequence of text characters, such as the message “Hello, World!”. Java…

Java Boolean type

java image

We’ll cover the following Booleans Note Example Booleans Java has a simple type, called boolean, for logical values. It can have only one of twopossible values, true or false. This is the type returned by all relational operators, suchas a…

Java char type

java image

We’ll cover the following Introduction Characters Unicode Escape Sequence Examples char vs int NOTE Introduction In Java, the data type used to store characters is char. However, C/C++ programmersbeware: char in Java is not the same as char in C…