Stay Tuned!

Subscribe to our newsletter to get our newest articles instantly!

Java Programming

Java – Abstraction in Java Programming

Abstraction in Java

Abstraction is the mechanism by which you hide data that is not required by a user.

The advantage of abstraction is that the user can work only with the needed data and is not required to view the unwanted data. i.e the owner of the car must know how to drive.

In OOPs, you must have to know about specific classes and methods that are called to implement specific program logic.

Java Source

public class Abstraction {
private int x;
private String str;
private double bal;
private double sal;
private double credit;

public void display(int n, String name, double bal){
System.out.println("Account Number:"+x);

public static void main(String[] args) {
Abstraction b=new Abstraction();
b.display(111, "Satya", 232323l);



About Author provides tutorials related to tech and programmings. We are also setting up a community for the users and students.

You may also like

introduction to java programming
Java Programming

Java – Introduction, Features, Versions & History

  • December 20, 2020
Java is a general-purpose computer programming language that is concurrent, class-based, object-oriented. Java inherits its object-oriented features from C++. Java
basic terms of java programming
Java Programming

Java – Basic Terms of Java Programming

  • December 20, 2020
A Java program, similar to programs in other programming languages, It also uses the literals, variables, tokens, data types, etc.