0% found this document useful (0 votes)
7 views12 pages

Difference Between

The document outlines various programming concepts and differences in Java and Selenium, including Assert vs. Verify, findElement() vs. findElements(), and method overloading vs. overriding. It also covers data structures like List, Set, and Map, as well as exception handling and threading methods. Additionally, it explains the differences between various keywords and methods in Java, such as final, finally, finalize, and the differences between Xpath and CSS Selector.

Uploaded by

ketang7
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
7 views12 pages

Difference Between

The document outlines various programming concepts and differences in Java and Selenium, including Assert vs. Verify, findElement() vs. findElements(), and method overloading vs. overriding. It also covers data structures like List, Set, and Map, as well as exception handling and threading methods. Additionally, it explains the differences between various keywords and methods in Java, such as final, finally, finalize, and the differences between Xpath and CSS Selector.

Uploaded by

ketang7
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 12

What is the difference between Assert and Verify

statements in Selenium?

What is the difference between findElement() and


findElements()?

What is the difference between List and Set


Difference Between Method Over Loading and method Over
ridding

Difference between Abstraction and Interface ?


Difference Between Method and Constructor ?
Difference between HashMap And Hash Table
Difference Between Abstraction and Encapsulation

Difference Between Array List and Array


Difference Between this and Super

Difference Between driver.get and driver.navigate


Difference Between driver.close and driver quit
• driver.quit():The quit() method quits the driver, closing
every associated window.
• driver.close(): The close() method closes the currently
focused window, quitting the driver if the current window is the
only open window. If there are no windows open, it will error
out.

Difference Between string , string buffer and string builder

Difference between Throw and Throws


Differences between final , finally and Finalized
final Finally finalize
final is a keyword in java finally is a block in java finalize is a method in java
final in java can be used with :

• variable - If you mark a


variable as final then
once you initialize value
to that variable, it can
never be changed.
• method - If you mark a
method as final in your
class then that method
cannot be overridden
by the sub-classes finalize() method is called at
method. least once, before the object is
• class - If you mark a finally block is used with try garbage collected, to perform
class as final in java block in exception handling. any cleanup activity like
then that class cannot This block will surely get releasing any system
be extended (or sub- executed irrespective of resources if held or closing the
classsed) whether exception is handled open connection.
or not.
final vs finally vs finalize

What is the difference between List, Set and Map


?
Ans. List - Members are stored in sequence in memory and can be accessed through
index.
Set - There is no relevance of sequence and index. Sets doesn't contain duplicates whereas
multiset can have duplicates. Map - Contains Key , Value pairs.
Difference between Public, Private, Default and
Protected ?
Ans. Private - Not accessible outside object scope.
Public - Accessible from anywhere.
Default - Accessible from anywhere within same package.
Protected - Accessible from object and the sub class objects.

Difference between == and .equals() ?

Difference between Checked and Unchecked exceptions ?

What is the difference between yield() and sleep()?

Ans. When a object invokes yield() it returns to ready state. But when an object invokes
sleep() method enters to not ready state.
what is the difference between collections class vs
collections interface ?

What is the difference between comparable and comparator in java.util pkg?


Difference between Implicit wait and explicit wait?

Difference between Ambulate and Relative Xpath

elementToBeClickable(By locator)

An expectation for checking an element is visible and enabled such that you can click it.

presenceOfElementLocated(By locator)

An expectation for checking that an element is present on the DOM of a page.

visibilityOf(WebElement element)

An expectation for checking that an element, known to be present on the DOM of a page, is visible.

Difference between X path and CSS Selector

Xpath traverse in both direction , forward and Reverse Direction

But CSS Selector : Traverse in forward direction only

You might also like