Skip to content

Make Selenium Easy

And Keep It That Way

  • Home
  • Share
  • Toggle search form

REST Assured Tutorial 5 – Abstraction – Hide The Implementation

Posted on 02/19/2025 By admin

As a part of End to End REST Assured Tutorial , in this post We will learn about Abstraction in Java.

If you are thinking why this topic is necessary , do not worry. I will connect all dots in upcoming posts.

Abstraction is one of the pillar in Object Oriented Programming. Java is an Object Oriented Programming language so it follows abstraction concept is as well. You must have gone through Abstraction concept and you find a common sentence as below:-

“Hiding the implementation and showing the essential feature to user is called Abstraction. Abstraction can be achieved using Abstract class and interface.”

When you start learning about Abstract class and interface and try to relate above Abstraction concept with it, you lose the path. When we say hiding the implementation is an abstraction then a method is also an example of abstraction. You create a method with all logic in it to perform a task and make it public so that other can simply use it without bothering about how method works internally. “Showing all essential details to outside world” is also possible using access specifiers like public , private , protected and default. What is special in Abstract class and Interface which allow us to achieve Abstraction? I hope I am making some sense.

I can define Abstraction as “Hiding the implementation” which could be done in multiple ways.

When we say Abstract class and Interface are ways to achieve abstraction, it means that “Perform a specific task and I don’t really bother how you do it“. Suppose I need to get the population of each district in India. I have a token which says that I need population details. Now a representative of each district will come to me and collect token. It is all representatives responsibility to provide me population detail of their districts. I really don’t bother how they will arrange the details. Process of performing tasks may be different for each district. This is actually meant by Abstraction.

Now relate this understanding with the concepts of Interface and Abstract class. Hopefully you will be able to understand. The best example will be WebDriver interface in Selenium. WebDriver has a contract of methods which is supposed to perform a specific task. Browser specific classes which implement WebDriver has responsibility to perform those tasks in their ways. Chrome browser does not worry about how Firefox browser is performing a tasks. WebDriver also has nothing to worry about implementation done by various browser. This is Abstraction.

If you have any doubt, feel free to comment below.If you like my posts, please like, comment, share and subscribe.#ThanksForReading

#HappyLearning

Uncategorized

Post navigation

Previous Post: REST Assured Tutorial 53 – How to create ResponseSpecification using ResponseSpecBuilder
Next Post: Java Interview Questions

Related Posts

Selenium Interview Questions: Why Do Not We Switch Back To Driver After Handling An Alert Uncategorized
Postman Tutorial Part 3 – Sending First GET Request in Postman – Make Selenium Easy Uncategorized
TestNG Tutorials 13: Can An Interface have TestNG Methods? If Yes, How To Execute Them? | Make Selenium Easy Uncategorized
image – Make Selenium Easy Uncategorized
getOrDefault in map Uncategorized
ScrollInToView3 – Make Selenium Easy Uncategorized

Recent Posts

  • Getting Started with Selenium 4: What Is New and How to Upgrade from Selenium 3
  • Manual Testing
  • Baby Steps To Become Efficient Selenium-Java Automation Tester
  • Features of Selenium 4.0.0 Release – Java Binding
  • Part 1: Handling Drop-down Created Using SELECT Tag In Selenium

Recent Comments

No comments to show.

Archives

  • April 2026
  • April 2025
  • March 2025
  • February 2025
  • January 2025
  • December 2024
  • November 2024
  • October 2024
  • September 2024
  • August 2024
  • April 2024
  • March 2024
  • February 2024
  • December 2023
  • October 2023
  • August 2023
  • November 2022
  • September 2022
  • August 2022
  • July 2022
  • May 2022
  • March 2022
  • October 2021
  • April 2021
  • March 2021
  • January 2021
  • December 2020
  • October 2020
  • September 2020
  • August 2020
  • June 2020
  • May 2020
  • April 2020
  • March 2020
  • February 2020
  • January 2020
  • December 2019
  • November 2019
  • October 2019
  • September 2019
  • August 2019
  • May 2019
  • December 2018
  • November 2018
  • October 2018
  • September 2018
  • August 2018
  • July 2018
  • January 2018

Categories

  • Getting Started
  • Uncategorized

Copyright © 2026 Make Selenium Easy.

Powered by PressBook Masonry Dark