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 :: math class in java 
Java :: flutter doctor Unable to find bundled Java version. 
Java :: java dictionary initialization 
Java :: set style programmatically android 
Java :: call by value and call by reference in java 
Java :: java check prime number 
Java :: MD5 java 
Java :: java and or precedence 
Java :: limit decimals java 
Java :: input arraylist in java 
Java :: how to start array index from 1 in java 
Java :: Java Method Create Basic 
Java :: get string size 
Java :: set up a tree in java 
Java :: firestore java timestamp 
Java :: what is encapsulation in java 
Java :: run specific test case junit 
Java :: recursion java fibonacci 
Java :: array buffer 
Java :: static method in non static class java 
Java :: mcq java 
Java :: naming convention in selenium 
Java :: enter a word and print letters java 
Java :: receive an int from terminal java 
Java :: first none duplicated char 
Java :: convert kotlin code to java 
Java :: sum of no 
Java :: exchangerate api 
Java :: error: package android.support.v4.content does not exist import android.support.v4.content.LocalBroadcastManager; 
Java :: action listener for button to close window java 
ADD CONTENT
Topic
Content
Source link
Name
1+1 =