What is the difference among String, StringBuffer and StringBuilder in Java? String String is immutable ( once created can not be changed )object . The object created as a String is stored in the Constant String Pool . Every immutable
What is immutable object in Java?
What is immutable object in Java? Immutable classes are Java classes whose objects can not be modified once created. Any modification in Immutable object result in new object. For example is String is immutable in Java. Mostly Immutable are also
Control Instruction
Control Instructions Program is a set of instructions. We know that each instruction of the program is executed by processor. Processor executes instructions one by one. Whatever we write in our program is executed in the same order as they
Assignment Operators
Assignment Operators Assignment operator is the most used operator in the expression. It is sometimes misinterpreted as equal to operators by beginners. Assignment operator is used to assign value to the variable. Assignment operator (=) It is a binary operator
Logical Operators
Logical Operators There are three logical operators in C language: ! Logical NOT && Logical AND || Logical OR Logical NOT Logical NOT operator is also a unary operator, as it requires only one operand. Operand is treated as either
Relational Operators
Relational Operators Relational Operators are used to states the truth value of the expression. Result of these operators are either 1 (for true) or 0 (for false). There are six such operators in C language. < (less than), > (greater
Bitwise operators
Bitwise Operators Operators that performs on bits (0 or 1) are known as bitwise operators. There are six bitwise operators & AND | OR ^ XOR ~ NOT >> Right Shift > Left shift >2; printf(“%d”,x); return(0); } Output: 3
Arithmetic Operators
Arithmetic Operators There are 5 arithmetic operators in C language. * (Multiplication), / (Divide) and % (Modulus) +(addition) and – (Subtraction) Operators *,/ and % are having same priority but higher priority than + and -. Operator + and –
Heap in Data Structure
1. Which of the following sequences of array elements forms a heap? (a) {23, 17, 14, 6, 13, 10, 1, 12, 7, 5} (b) {23, 17, 14, 6, 13, 10, 1, 5, 7, 12} (c) {23, 17, 14, 7, 13,
Unary Operators
Arithmetic Instruction Arithmetic instruction is used to manipulate data using operators To understand operators in a better way we put them in 7 groups. Unary Operators Arithmetic Operators Bitwise Operators Relational Operators Logical Operators Conditional Operators Assignment Operators Unary Operators