Abstraction Program in Java

Advertisements

Encapsulation Program in Java Polymorphism Program in Java

Abstraction Example in Java

Abstraction is the concept of hiding of data is known as data abstraction. Here we write code for data abstraction using java programming.

Abstraction Example in Java

class Customer
{
int account_no;
float balance_Amt;
String name;
int age;
String address;
void balance_inquiry()
{
/* to perform balance inquiry only account number
is required that means remaining properties 
are hidden for balance inquiry method */
}
void fund_Transfer()
{
/* To transfer the fund account number and 
balance is required and remaining properties 
are hidden for fund transfer method */
}

Output


Syntax to compile and run java program

Syntax

for compile -> c:/>javac Customer.java
for run -> c:/>java Customer

For more derails about Inheritance in Java


Encapsulation Program in Java Polymorphism Program in Java

Google Advertisment

Buy This Ad Space @$20 per Month, Ad Size 600X200 Contact on: hitesh.xc@gmail.com or 9999595223

Magenet is best Adsense Alternative here we earn $2 for single link, Here we get links ads. Magenet

For Projects 9999595223

Google Advertisements


Buy Websites 9999595223

Buy College Projects with Documentation Contact on whatsapp 9999595223. Contact on: hitesh.xc@gmail.com or 9999595223 Try this Keyword C++ Programs

Advertisements