Java

String Class In Java

What is String in Java? String is basically an sequence of char values in Java. String is also an object in Java. //Declaration of char array char[] seqChar = {‘q’,’a’,’c’,’r’,’e’,’a’,’t’,’o’,’r’,’s’};123//Declaration of char array char[] seqChar = {‘q’,’a’,’c’,’r’,’e’,’a’,’t’,’o’,’r’,’s’};1 St way : …

Read more

Operators in Java

Java Operators : Java Operators is a symbol which is used to perform logical or mathematical manipulations. There are different types of operators available in java such as Arithmetic OperatorsAssignment OperatorsBitwise OperatorsConditional OperatorLogical OperatorsRelational Operators Arithmetic Operators : Java is …

Read more

Loops In Java

A situation occurs where we need to execute our set of statements n number of times again and again until the condition satisfies. Loops are mostly commonly used where a single set of code needs to be executed repetitive times. …

Read more

First Java Program

Steps To Create a Java File :1.Create a folder with any name. It acts as a default package. 2.Open any text editor preferably notepad, type the program (source code and save it in the directory created in step 1. File …

Read more

Different Variables In Java

Different Types of Variables in Java: Based on our usage there are three different types of variables. They are 1.Local Variables 2.Instance Variables or global variables. 3.Static Variable. 1.Local variable : A variable declared within a method is called as …

Read more

Decision Making In Java

Decision Making statements will have one or more conditions to validate and check whether conditions are satisified. In case the conditions satisfies Boolean value as “True”, a set of statements are executed within the block and a set of remaining …

Read more

Constructors in Java

Constructor in java is a special method that is responsible for initializing the object. Rules to create Java Constructor :Basically there are differences between method and constructor. Name of the constructor should be same as the class name. Constructor should …

Read more