shumaila brohi
Nov 4 · 2 min read
ABSTRACT DATA TYPE IN JAVA

Let’s start this topic by understanding the word data type.

What is Data Type?

Data is information and type means what kind of information simply Data Type means some kind of particular information or data.

The question arrive here that how many kinds of Data Types in java?

There are two kinds of Data Types in java.

  1. Primitive Data Types
  2. Non-Primitive Data Types

What is Abstract Data Type?

Abstract Data Type is a model of data type in which we know the properties and operation of the data type that can performed on it but we don’t know how to implement it.

Example; Like I have a integer number -3,-2,-1,0,1,2,3

the properties of this number is that it’s a integer number and it is positive and negative.And the operations this number can performed are subtraction, multiplication,addition and subtraction.

Here are some of the Abstract Data Types.

  1. List
  2. Stack
  3. Queue
  1. LIST

List is a collection of data types in which you can performed some operations like insert,add,delete and many others.

2. STACK

Let’s understand this by a real world example like you have book shelf you put your book’s in a random position.Now you want to take a book from shelf you can see that the book which you put in the last is on the top position. The conclusion of the Stack is like LAST IN FIRST OUT.

3. QUEUE

Queue is the reverse of the stack.

Let’s understand this by a real world example if you are going to the cinema and you reached their soon and you got the tickets on the front seat. So I sum up this whole theory in one point FIRST IN FIRST OUT.

Welcome to a place where words matter. On Medium, smart voices and original ideas take center stage - with no ads in sight. Watch
Follow all the topics you care about, and we’ll deliver the best stories for you to your homepage and inbox. Explore
Get unlimited access to the best stories on Medium — and support writers while you’re at it. Just $5/month. Upgrade