Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
0% found this document useful (0 votes)
120 views

Data Structures in Java

This document discusses various data structures in Java including self-referential classes, dynamic memory allocation, linked lists, sockets, queues, and trees. Self-referential classes contain a reference member that refers to an object of the same class type, allowing objects to reference other objects of the same class, such as with a Node class that defines a Node object with a data field and next field that also references another Node.

Uploaded by

api-3777165
Copyright
© Attribution Non-Commercial (BY-NC)
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
120 views

Data Structures in Java

This document discusses various data structures in Java including self-referential classes, dynamic memory allocation, linked lists, sockets, queues, and trees. Self-referential classes contain a reference member that refers to an object of the same class type, allowing objects to reference other objects of the same class, such as with a Node class that defines a Node object with a data field and next field that also references another Node.

Uploaded by

api-3777165
Copyright
© Attribution Non-Commercial (BY-NC)
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
You are on page 1/ 2

Data structures in Java

Self-Referential classes.
Dynamic memory allocation
Linked List
Sockets
Queues
Trees
Self-Referential classes.
A self referential class contains a reference member
that refers to a class object of same class type.
class Node
{
private int data;
private Node next;
Node(int d){//method body}
void setData(int d) {//method body}
void getData() {//method body}
void setNext(Node nextNode) {//method body}
void getNext() {//method body}
}

You might also like