main function is part of the class therefore we should be able to access root as it is instead of tree.root after creating an object of the class, as instance variables are accessed using this variable inside instance method?
class Main
{
Node root;
Main()
{
root = null;
}
public static void main(String[] args)
{
Main tree = new Main();
// tree.root = new Node(1);
}
} ```