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

Search text in multiple files in Eclipse

There are many times when a developer needs to search some text in the code. The developer may know the file name in which the text is to be searched or may need to search the text in the complete workspace. We will see a single way through which we can search the text in … Read more

Debugging in Eclipse

What is Debugging? Debugging of the code helps us to understand execution of the program line by line. In debugging we can see what is value of variables after each line which can help us understand logic of code and identify errors or bugs. Debugging can be done manually using pen and paper or by … Read more

Download Eclipse and Create Workspace

Eclipse is a very popular IDE among developers because of its vast features and ease of use. Before getting into basics of Eclipse we will see how to download Eclipse and create workspace in Eclipse. What is an IDE? IDE is short for Integrated Development Environment. An IDE consolidates operations such as coding, debugging, running, … 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

Format code in Eclipse

While coding we have to deal with many loops and if conditions. Due to this, we forget to maintain proper spacing between lines and character. As result the code becomes difficult to read for some other person. So instead of organizing/formatting the code manually in Eclipse we can format the code on a single click. … 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

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