Operators in java

java provides a rich operator environment. Most of its operators can be divided into the following four groups: arithmetic, bitwise, relational, and logical. Java also defines some additional operators that handle certain special situations Arithmetic Operators Arithmetic operators are used in mathematical expressions in the same way that they are used in algebra. The following … Read more

Lexical Issues in java

In Java programming, lexical issues refer to problems related to the syntax and semantics of the language. These issues include errors in the naming of variables and methods, incorrect use of keywords, and invalid expressions or statements. Example of Lexical Issues in Java Invalid identifier: int 3years = 2023; // Identifier starts with a number … Read more

The for Loop in java

The simplest form of the for loop is for(initialization; condition; iteration) statement; In its most common form, the initialization portion of the loop sets a loop control variable to an initial value. The condition is a Boolean expression that tests the loop control variable. If the outcome of that test is true, the for loop … Read more

What is a String in java ?

A string in java is a sequence of characters treated as a unit Strings in Java standard objects with built-in language support String – class for immutable (read-only) strings StringBuffer – class for mutable strings can be converted to other types like integers and booleans like other classes, String has constructors and methods unlike other … Read more