• Post Reply Bookmark Topic Watch Topic
  • New Topic

Prioritized LinkedList  RSS feed

 
Mohammad Khaled
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello there
I'm new in java programming and I have implemented a prioritized LinkedList in java.

you can check it out here https://github.com/eng-mohammad/PriorityLinkedList and tell me what you think
 
Jeanne Boyarsky
author & internet detective
Marshal
Posts: 37496
547
Eclipse IDE Java VI Editor
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Welcome to CodeRanch!

In the Node class, how come your variable is named "oBject" instead of "object"?

Overall the class looks good. Two things you could do to make it more concise

1) No need for an if statement. These two code snippets do the same thing:





2) You can chain constructors to avoid duplicate code



could be

 
Mohammad Khaled
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Jeanne Boyarsky wrote:Welcome to CodeRanch!

In the Node class, how come your variable is named "oBject" instead of "object"?

Overall the class looks good. Two things you could do to make it more concise

1) No need for an if statement. These two code snippets do the same thing:





2) You can chain constructors to avoid duplicate code



could be



thank you so much for your nice replay, I think I've learnt from your notes much
wish you a nice day
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!