We have provided a Selenium with Java program below. These types of questions are common in the programming test rounds for Selenium automation testing.
Your task is to determine the output of the code. Click the Solution button below to view the answer. Your feedback, along with any comments, would be greatly appreciated.
import org.testng.annotations.Test;
public class SampleProgram5{
@Test
public void testMySkills() {
System.out.println(printString());
}
public String printString() {
String str = "Welcome to zesting zalks Lazesz";
str = str.replaceAll("z","t");
return str;
}
}