public class test { private Node head; private class Node{ int p; Node next; public Node(int p, Node next) { this.p = p; this.next = next; } } public void set() { set(head); } private void set(Node p) { p = new Node(1, null); } public boolean isEmpty() { return head == null; } public static void main(String[] args) { test a = new test(); a.set(); System.out.println(a.isEmpty()); } }
head
set
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)