Author Archives: Help_adm

Character Class

Normally, when we work with characters, we use primitive data types char. Example char ch = ‘a’; // Unicode for uppercase Greek omega character char uniChar = ‘\u039A’; // an array of chars char[] charArray ={ ‘a’, ‘b’, ‘c’, ‘d’, ‘e’ }; However in development, we come across situations where we need to use objects… Read More »

Numbers Classes in Java

Normally, when we work with Numbers, we use primitive data types such as byte, int, long, double, etc. Example int i = 5000; float gpa = 13.65f; double mask = 125; However, in development, we come across situations where we need to use objects instead of primitive data types. In order to achieve this, Java… Read More »

Decision Making Statement in Java

Decision making structures have one or more conditions to be evaluated or tested by the program, along with a statement or statements that are to be executed if the condition is determined to be true, and optionally, other statements to be executed if the condition is determined to be false. Following is the general form… Read More »

How to add Loops in Java?

There may be a situation when you need to execute a block of code several number of times. In general, statements are executed sequentially: The first statement in a function is executed first, followed by the second, and so on. Programming languages provide various control structures that allow for more complicated execution paths. A loop statement allows… Read More »

Basic Operators in Java

Java provides a rich set of operators to manipulate variables. We can divide all the Java operators into the following groups − Arithmetic Operators Relational Operators Bitwise Operators Logical Operators Assignment Operators Misc Operators The Arithmetic Operators Arithmetic operators are used in mathematical expressions in the same way that they are used in algebra. The… Read More »

Modifier Types in Java

Modifiers are keywords that you add to those definitions to change their meanings. Java language has a wide variety of modifiers, including the following − Java Access Modifiers Non Access Modifiers To use a modifier, you include its keyword in the definition of a class, method, or variable. The modifier precedes the rest of the… Read More »

Which are the Variable Types in java?

A variable provides us with named storage that our programs can manipulate. Each variable in Java has a specific type, which determines the size and layout of the variable’s memory; the range of values that can be stored within that memory; and the set of operations that can be applied to the variable. You must… Read More »

Basic Datatypes in Java

Variables are nothing but reserved memory locations to store values. This means that when you create a variable you reserve some space in the memory. Based on the data type of a variable, the operating system allocates memory and decides what can be stored in the reserved memory. Therefore, by assigning different data types to… Read More »

What is the Constructors?

A constructor initializes an object when it is created. It has the same name as its class and is syntactically similar to a method. However, constructors have no explicit return type. Typically, you will use a constructor to give initial values to the instance variables defined by the class, or to perform any other start-up… Read More »

Object and Classes of java

Java is an Object-Oriented Language. As a language that has the Object-Oriented feature, Java supports the following fundamental concepts − Polymorphism Inheritance Encapsulation Abstraction Classes Objects Instance Method Message Passing In this chapter, we will look into the concepts – Classes and Objects. Object − Objects have states and behaviors. Example: A dog has states –… Read More »