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 …

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, …

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 …

Using Arrays in Java

This article explains Using Arrays in Java. Basically, an array is a data type that contains multiple elements of the same data type. Declaring Arrays in Java The following code shows that how to declare arrays in Java. Syntax: Since, arrays are dynamically, allocated in Java, we need to use the new operator, as shown …

Java Practice Exercise

This Java Practice Exercise contains programming problems on core Java. Further Reading 30+ Basic Java Programs Java Code Examples The following Java Practice Exercise will help you learn the Java Programming Language. Create a Java application that computes and displays the area of a circle. Demonstrate how typecasting & conversions take place in Java. Write …

Struts Architecture

Overview of Struts Architecture

In this article, I will discuss struts architecture. Basically, a Java-based dynamic web application comprises servlets and JSP files. While servlet API along with JSP is sufficient to create a web application. But still, application development becomes easier with the use of frameworks. So, the use of a framework reduces both development time and effort. …