Win a copy of Learn Spring Security (video course) this week in the Spring forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

JAVA Collection frame work

 
veena bijur
Ranch Hand
Posts: 67
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi

Everyone,

DataStructure in Java works same as in C language?

1. LinkedList,Binary tree, Queue,Stack, only thing all are built-in classes in java.we need to decide which one to use and all.
But internally works same as learnt in C language?

Please help.

Thanks
 
Jesper de Jong
Java Cowboy
Saloon Keeper
Posts: 15203
36
Android IntelliJ IDE Java Scala Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
How those data structures work is independent of any programming language.
 
Jeff Verdegan
Bartender
Posts: 6109
6
Android IntelliJ IDE Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
veena bijur wrote:
DataStructure in Java works same as in C language?

1. LinkedList,Binary tree, Queue,Stack, only thing all are built-in classes in java.we need to decide which one to use and all.
But internally works same as learnt in C language?


They work according to what their docs say they do, which is pretty much in accordance with how those types are described to behave in a data structures text book. Similarly named data structures in C will behave similarly, if they're written correctly.

As for "internally," if you mean how they're implemented, then that is not specified. Each Java version or implementation could be different from the others, and they could all be very different from C. In fact it's guaranteed that they'll be different from C to some extent. But the general structure and flow will probably be pretty similar among most implementations.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic