Search
 
SCRIPT & CODE EXAMPLE
 

JAVA

abstraction in java

Abstraction is nothing but the quality of dealing with ideas rather than 
events. It basically deals with hiding the internal details and showing 
the essential things to the user.
Comment

Java Abstraction

abstract class Animal {
  public abstract void animalSound();
  public void sleep() {
    System.out.println("Zzz");
  }
}
Comment

abstraction in java

Sometimes we may come across a situation
where we cannot provide implementation to
all the methods in a class. We want to leave the 
implementation to a class that extends it.
  In that case we declare a class
as abstract by using abstract keyword on method
signature.In my framework I have created my
PageBase class as super
class of the all page classes. 
I have collected all common elements
and functions into PageBase class and
all other page classes extent PageBase class.
By doing so, I don't have to locate very
common WebElements and it provides
reusability in my framework.
Also
1)Abstract classes cannot be instantiated
2)An abstarct classes contains abstract method,
concrete methods or both.
3)Any class which extends abstarct class must
  override all methods of abstract class
4)An abstarct class can contain either
  0 or more abstract method.   
Comment

PREVIOUS NEXT
Code Example
Java :: how to create a gui in java 
Java :: java split int 
Java :: java random number generator in range 
Java :: spring boot dockerfile 
Java :: lambda expressions in java 
Java :: generate uuid from string 
Java :: Android: remove shadow from bottom navigation 
Java :: equals ignore case java 
Java :: jmeter get var 
Java :: view all certificates from keystore java 
Java :: java print 2d array as table 
Java :: java string.format system.currenttimemillis 
Java :: comment générer un nombre aléatoire en java 
Java :: button getsource 
Java :: enum values to string array 
Java :: android dialogfragment fullscreen stack overflow 
Java :: android access main toolbar in fragment 
Java :: Divide two integers without using multiplication, division and mod operator 
Java :: How to get a context in a recycler view adapter 
Java :: regular expression java 
Java :: how to concatenate two strings in java 
Java :: add int to list java 
Java :: android dialog modal 
Java :: this keyword java 
Java :: java bfs 
Java :: interface extending interface in java 
Java :: how to replace in java 
Java :: How to implement the A* shortest path algorithm, in Java? 
Java :: jdialog middle of screen 
Java :: how to use enumUtils in java 
ADD CONTENT
Topic
Content
Source link
Name
7+8 =