Skip to toolbar

QnA | How do I reverse a String/Sentence in Java?

Question: Print Hello World as ‘Olleh Dlrow’ using Java. Problem Write a program to reverse a String or we can say that reverses each word in a sentence and also while printing the first letter should be in upper case. Input can contain any number of words as mentioned below: Input String:- Hello Worldask for helpYou Live Only OnceRead More

getWindowHandle() and getWindowHandles() methods.

getWindowHandle() stores the reference of the currently active window. On the other hand, getWindowHandles() returns a list of all the opened windows associated with a particular driver instance. getWindowHandle() It basically returns an id(handle) pointing to the currently active window. The return type of this method is a String type. We can use this referenceRead More

Windows Handling | Multiple windows handling using JavascriptExecutor.

Traversing through multiple windows using ‘JavascriptExecutor’ and selecting user-defined tab window with ‘Title Partial Text’. This process is called multiple windows handling.                Some times we have to open multiple windows (tabs) as per the requirement and need to switch the control through various tabs to select user definedRead More

File Handling | Copy existing data from one workbook to another workbook in Java.

Copy existing data from one workbook to another workbook in Java using File Handling. We have to copy existing data from one workbook to another workbook in Java. Example: This includes all the sheets and its content from input workbook as mentioned in the below example. Overview of Program As per the above screenshot, we clearlyRead More

File Handling | Reading data from Excel files (.xls or .xlsx) using JAVA.

Reading data from Excel files (.xls or .xlsx) using JAVA.   package excel; import java.io.File; import java.io.FileInputStream; import java.io.IOException; import java.util.Iterator; import org.apache.commons.io.FilenameUtils; import org.apache.poi.hssf.usermodel.HSSFSheet; import org.apache.poi.hssf.usermodel.HSSFWorkbook; import org.apache.poi.ss.usermodel.Cell; import org.apache.poi.ss.usermodel.Row; import org.apache.poi.xssf.usermodel.XSSFSheet; import org.apache.poi.xssf.usermodel.XSSFWorkbook; public class ExcelHandling { public static void main(String[] args) throws IOException { // TODO Auto-generated method stub String filePath=”input_Excel//testData.xlsx”; loadFile(filePath);Read More

Basic Java – 14 || Difference between IndexOf() and lastIndexOf() methods of Strings in JAVA.

Both indexOf() and lastIndexOf() are methods of String object. These methods will be used to get the position or index of a particular character/substring within the target string. Important Notes: Index of a string would start from 0. The searching of the character or substring is case sensitive. Means small a and capital A areRead More

Site Statistics

  • Users online: 0 
  • Visitors today : 6
  • Page views today : 7
  • Total visitors : 48,851
  • Total page view: 67,266

   YouTube ChannelQuora

            Ashok Kumar is working in an IT Company as a QA Consultant. He has started his career as a Test Trainee in manual testing in August 2010. Then he moves towards the automation testing after 4 years. He started learning JAVA and Selenium by self to get the knowledge of automation.

       While learning these tools and working on multiple projects, he found that sometimes people get stuck in live scenarios in their project and they have to do lots of RnD to get out of it. So he decided to start blogging only for such scenarios, where anyone facing any problem in their project, can ask any question or give a solution or you can say an alternate solution to achieve the goal successfully.

Later on, he observed that some people want to learn Java but they have few questions in their mind like how to start Java, whether we should go for the online or offline course. So he started writing tutorials on Java, Jira, Selenium, Excel etc.