C# Program to Illustrate Multilevel Inheritance with Virtual Methods

In this tutorial, we will write a C# program to illustrate Multilevel inheritance with Virtual Function. You may go through the following topic in C#. C# inheritance Virtual functions are created in order to override the functions with the same name just like in the given below program. C# Program for Multilevel Inheritance with Virtual … Read more

C# Program to Reverse an Array

In this tutorial, we will write a C# program to reverse an array, we have used while loop and for loop to reverse an array in C#. Question:Write a C# Program to Reverse an array without using function. C# Program to Reverse an Array The output of reversing an Array in C#.

Selection Sort Program in C#

Sorting is a technique for organizing the elements in an increasing or decreasing order. Similarly, the Selection sort algorithm is one of the techniques to achieve the ordering of elements in an array in an increasing or decreasing order in a program. Selection Sort Algorithm The selection sort is a simple sorting algorithm which is … Read more

Java – Relational Operator

Comparison operators are used to comparing two values and return boolean results. These operators are used to check for relations like equality, greater than, less than between two values. They are used with a loop statement and also with if-else statements. Following are the Relational operators in Java: Operator Name Example == Equal to. A == B … Read more

Java – Logical Operator

Logical Operators are used in conditional statements and loops for evaluating a condition with binary values. All of the binary logical operators combine two boolean values that are true and false to form a result value. Logical Operators with their description: Operator Description Example && (logical and) If both the operands are non-zero, then the … Read more

Ternary Operator in Java

Ternary Operator is also known as the Conditional operator. It is used to evaluate Boolean expressions. We can say that it is a short version of the if-else statement. But here instead of operating on two operands, it operates on three operands, and therefore the name ternary. Syntax: of Ternary Operator: variable num1 = (expression) … Read more

Java – Assignment Operator

Assignment operator is used to assigning a value to any variable. This operator assigns the value of the right–hand side of an operator to the left–hand side. Various assignment operator in Java:These are the short version formed by combining the two operators. For example Instead of writing, we can write a+= 5. Assignment operator: ‘=’ This operator … Read more

Java – Arithmetic Operators

1. Arithmetic Operators:  They are used to perform basic arithmetic operations. They perform on primitive data types.They are: * : MultiplicationMultiplies two valuesExample: x * y; / : DivisionDivides one value from anotherExample: x / y; % : ModuloReturns the division remainderExample: x % y; + : AdditionAdds together two valuesExample: x + y; – : … Read more

Java – Bitwise Operator

Bitwise operator works on bits and performs a bit-by-bit operation. There are six Bitwise Operators and can be applied to the integer types, long, int, short, char, and byte. List of Bitwise Operator in Java: Bitwise AND: ‘&’Binary AND Operator copies a bit to the result if it exists in both operands. Bitwise OR: ‘|’Binary … Read more