Java main method and also linked list examples