• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Circular List

 
Ronald Spina
Greenhorn
Posts: 26
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Good afternoon,

I'm working on a program in which I am trying to implement a circular list. Till now I have a MainProgram where I invoke method from the Method class in which I prompt the user to enter details and return this as an object. Then I have created my circular list with methods append and show. I'm appending the object to my circular list and then i will invoke method ListAll() to show all the members of the list.

The problems I have is that i am not sure if the circular list is beign populated... and none members are beiggn shown. I know I surely have some mistakes in CircularList class but i'm stuck and cannot identify my mistakes.

Below follows my code. Thanks

import java.util.*;



import java.util.*;




 
Henry Wong
author
Marshal
Pie
Posts: 20823
75
C++ Chrome Eclipse IDE Firefox Browser Java jQuery Linux VI Editor Windows
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Take out a pencil and paper, and walk through what your append method is doing. You will see that it doesn't do it correctly.

Henry
 
Ronald Spina
Greenhorn
Posts: 26
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks henry .. i have revised method append and adjusted as follows

However it is still not working.
 
Henry Wong
author
Marshal
Pie
Posts: 20823
75
C++ Chrome Eclipse IDE Firefox Browser Java jQuery Linux VI Editor Windows
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Ronald Spina wrote:Thanks henry .. i have revised method append and adjusted as follows

However it is still not working.


Go back to pen and paper (and walk through the methiod) again. You will see why.

Henry
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic