Create a Web project in Eclipse

In Eclipse web projects can be created easily. We will see how to create a simple web project having a JSP file and an HTML file. We will also see how to setup Tomcat server to run our web project. Let us look at steps to create Web project :- Step 1 :- Click on … Read more

Shortcut to generate Getter and Setter in Eclipse

What are Getter and setter methods ? Getter method is to retrieve the value of instance variable while a setter method is used to set or update the value of instance variable. It is a good practice to access instance variables through these methods instead of directly accessing because we can place some pre-conditions before … Read more

Common Terms used in IT Industry that Everyone should know

“John, Can you deploy Branch 675 on UAT environment”. If John was a fresher then he would understand nothing in the above instruction given to him by senior. When we join any industry as a fresher then the most common problem we face is that we are not aware of the common terminologies/jargon used for … Read more

stripTrailing() method of String class

stripTrailing() method has been introduced in String class of Java 11. It is used to remove all the trailing white space characters from the string and return the remaining string. It means it removes white spaces that come at the end of string. If the string only contains the white spaces then an empty string is returned. Let us … Read more

stripLeading() method in String class

stripLeading() method has been introduced in String class of Java 11. It is used to remove all the leading white space characters from the string and return the remaining string. It means it removes white spaces that comes at beginning of the string. If the string only contains the white spaces then an empty string … Read more

strip() method in String class

In Java 11 a new method strip() has been introduced in String class. It is used to remove all the trailing and leading white space characters from the string. strip() method returns the string after removing these white spaces. If the string only consists of white spaces then an empty string is returned. Let us … Read more

isBlank() vs isEmpty() in String class Java

isBlank() is a new method introduced in String class in Java. By naming isBlank() and isEmpty() methods look similar to each other, but there is a slight difference between them – isBlank() returns true for the string having only white space characters whereas isEmpty() will return false for such strings. Let us understand the difference … Read more

Binary Search in Java

Binary search is an optimized algorithm to perform searching operation. It follows Divide and Conquer approach for searching. Pre-condition of Binary search : To perform Binary search the array should be sorted in ascending or descending order. Logic of Binary Search Let us consider array is sorted in ascending order. Now we compare the element … Read more