Posts

Showing posts with the label 50 common interview questions answers Java

Comprehensive Selenium WebDriver Syntax for Effective Test Automation

Comprehensive Selenium WebDriver Syntax for Effective Test Automation public static void main(String[] args ) throws InterruptedException, IOException { System. setProperty ( "webdriver.chrome.driver" , "./Drivers/chromedriver.exe" ); WebDriver driver = new ChromeDriver(); driver .manage().window().maximize(); driver .manage().timeouts().implicitlyWait(30, TimeUnit. SECONDS ); driver .get( "https://www.w3schools.com/html/html5_draganddrop.asp" ); //Actions MouseOver WebElement src = driver .findElement(By. xpath ( "//input[@id='name']" )); WebElement trg = driver .findElement(By. xpath ( "//input[@id='city']" )); Actions action = new Actions( driver ); action .dragAndDrop( src , trg ).build().perform(); action .contextClick( src ).build().perform(); action .moveToElement( src ).build().perform(); //DropDown WebElement country = driver .findElement(By. xpath ( "//input[text()='country']" )); Selec...

Here are 50 common interview questions and answers for Java fresher:

Image
 Sure! Here are 50 common interview questions and answers for Java fresher: 1. What is Java? Java is a high-level, object-oriented programming language used to develop a wide range of applications. 2. What are the main features of Java? Java is platform-independent, supports multithreading, has automatic memory management (garbage collection), and provides a rich set of APIs. 3. What is the difference between JDK and JRE? JDK (Java Development Kit) is a software development environment that includes tools for developing, debugging, and compiling Java applications. JRE (Java Runtime Environment) is required to run Java applications. 4. What is the difference between a class and an object? A class is a blueprint or template for creating objects, while an object is an instance of a class. 5. What is the difference between a compiler and an interpreter? A compiler converts the entire source code into machine code before execution, while an interpreter converts and executes the code lin...