Home » Archives for Firouzeh hejazi

Author Archives: Firouzeh hejazi

Firouzeh hejazi
A self-motivated and hard-working developer with more than 4 years of extensive experience in developing software in java platforms. A multi-skilled and problem-solving engineer who has participated in implementing a range of applications in different roles. Possess a MSc in Knowledge Engineering and Decision Science.

Java Optional Parameters

In this post, we feature a comprehensive article about the Java Optional Parameters. When you design a method in a Java class, some parameters may be optional for its execution. 1. Java Optional Parameters You can tackle Java optional parameters in method in several different ways. We will see them in the following: 1.1 Mutability with accessors Using standard getters ...

Read More »

How to call a method in Java

A method is a collection of statements that are grouped together to perform an operation. You can pass data, known as parameters, into a method. Methods are also known as functions. Each method has its own name.  When that name is encountered in a program, the execution of the program branches to the body of that method. When the method is finished, execution returns ...

Read More »

Java System.exit() Example

In this article we want to explain the Java System.exit method in Java. 1. Syntax and functionality of the Java System.exit The java.lang.System.exit() method exits current program by terminating running Java virtual machine. This method takes a status code as an argument. Following is the syntax for java.lang.System.exit() method: public static void exit(int status) 1.1 Parameters status − This is the exit status. exit(0) : means ...

Read More »

How to Compile Java Program

In this article we will see how to compile Java program. In fact, High-level languages like Java, C, C++, etc. compile a program to its equivalent low-level code which can be understood and executed by the machine. 1. Requirements First of all we should install JDK, then follow the below steps: Open a command prompt window and go to the directory where you ...

Read More »

Java Capitalize First Letter Example

In this post, we feature a comprehensive Java Capitalize First Letter Example. We want to write a Java program to convert first character uppercase in a sentence and if any character apart from the first one is in Uppercase then convert in into Lowercase. 1. Introduction Firstly, lets see how to capitalize the first letter of a single word, Example01: ...

Read More »

Exception Handling in Java – How to throw an exception

In this article we will explain the Exception Handling in Java. If you want to learn more on How to throw an exception in Java, you can also check the Java Exceptions List Example. 1. What are Exceptions? Exceptions are events that occur during the execution of programs that disrupt the normal flow of instructions (e.g. divide by zero, array access ...

Read More »

Spring Boot add filter Example

In this article, we will see how to configure Filter using Spring Boot. Also, we will see how to configure multiple filters. 1. What are Filters? Filter is an interface available in javax.servlet package which use to perform filtering task on request to a resource (a servlet or static content), or on the response from a resource, or both . In ...

Read More »

Reverse Array Java Example

ٌHow would you answer this question: how do you reverse an array in Java?  Well, there are multiple ways to solve this problem: Revere array in Place:You can reverse array by writing your own function, which loops through the array and swaps elements until the array is sorted. You can reverse an array by converting array to ArrayList and then ...

Read More »

Java Synchronized Blocks Example

In this post, we feature a comprehensive article on Java Synchronized Blocks. Java synchronized keyword marks a block or method a critical section. A critical section is where one and only one thread is executing at a time, and the thread holds the lock for the synchronized section. Java is multi-threaded language where multiple threads runs parallel to complete their ...

Read More »

Access Modifiers in Java Example

In this post, we will talk about the types of Access Modifiers in Java, which are private, default, protected, and public. Generally, there are two types of modifiers in Java: access modifiers and non-access modifiers. The access modifiers specify accessibility (scope) of a class, constructor, variable, method, or data member. 1. Access Modifiers in Java – Types We have 4 ...

Read More »