In the following code
- why "Node head" is kept outside the inner class node?
- Since Node class is defined after writing "Node head", does it create any problem?
why is the inner class defined as static?
class LinkedList{ Node head; // head of list
/* Linked list Node. This inner class is made static so that main() can access it */ static class Node { int data; Node next; Node(int d) { data = d; next=null; } // Constructor }