One Dimensional and Two Dimensional Indexers in C#

This article explains One Dimensional and Two Dimensional Indexers in C#. In short, an indexer allows an object to behave like an array. What is an Indexer? Basically, an indexer is a member of a class in C#. The following list provides important points regarding an indexer. Since, indexers are members of a class, they are accessible using the objects […]

Parameterized Constructor Example in Java

This article demonstrates Parameterized Constructor Example in Java. At first, we describe constructors in a class. Role of Constructor in a Class Since a class contains insance variables that each object of the class has its own copy, so it also needs a mechanism to initialize those instance variable. Indeed, a constructor provides such mechanism to a class. In general, […]

Sorting in Ascending Order in Java

This article demonstrates Sorting in Ascending Order in Java. In fact, array sorting is used in nearly every kind of computer application. It is an important algorithm that we must implement efficiently. Moreover, we can implement sorting in many ways. According, several kinds of sorting algorithms exist. For instance, we have bubble sort, insertion sort, selection sort, heap sort, quick […]

Static Class Example in C#

Today I will explain a Static Class Example in C#. To begin with, let us first understand what is a static class. Static Class in C# Basically, a static class in C# is a class, which can’t be instantiated. Therefore, the purpose of creating a static class is to define methods that can’t be associated with any object. Whenever we […]

Using Numbers As Command Line Arguments in Java

This article demonstrates a program Using Numbers As Command Line Arguments in Java. To begin with, let us first understand what is a command-line argument. In general, a command-line argument is passed to the program at the time of executing the command to run the program. In other words, when we run a Java program at the console, we can […]

Working with Classes and Objects in Java

This article describes Working with Classes and Objects in Java. Basically, class is a user-defined type. While an object is a real-world entity. Further, an object has attributes and also has a behavior. Since Java is an object-oriented language, a Java program comprises one or more classes containing certain members. Syntax of Creating a Class in Java So, we declare […]

Rotating an Array in C#

The following code example demonstrates Rotating an Array in C#. In fact, array rotation is a programming exercise that helps you improve programming logic. Moreover, it also requires students to develop critical thinking and to find think about logic to solve a problem in an efficient manner. In other words, the application logic needs to be developed in such a […]

JSTL Tags for Condition and Loop

In this article, I will discuss the examples of JSTL Tags for Condition and Loop. In general JSP tag Library contains <c:if>, and <c:forEach> tags for checking conditions, and loops respectively. Syntax of <c:if> Tag <c:if test=””, var=””, scope=””></c:if> Basically, the test attribute specifies the condition. While the var attribute stores the result of the condition and scope represents the […]

Standard Template Library in C++

Basically, Standard Template Library (STL) in C++ is a library of data structures. Hence, by using STL, we need not bother about implementing the commonly used data structures. Instead, we can focus on application-specific tasks. Therefore, Standard Template Library in C++ supports the reusability of the code. Another benefit that we get by using STL is that our code becomes […]