Class type variable Is possible in Java? [duplicate]

This question already has an answer here:

Is it okay for a class to have a field of its own type

4 answers

having a field with the same class inside a class

4 answers

I found a code on the internet for creating LinkedList using Java. I don't understand some line of code.

/* Class Node */

class Node


protected int data;

protected Node link;

// rest of the code...


link is a Node type variable?

another statement is in the same program.

Another class in the same program

/* Class linkedList */

class linkedList


protected Node start;

protected Node end ;

public int...

Read More »

By: StackOverFlow - Tuesday, 13 March

Related Posts