?
Solved

Difficult supporting a Set data type in programming languages

Posted on 2006-05-24
7
Medium Priority
?
208 Views
Last Modified: 2010-03-31
Hi,

I was wondering if anyone knew why it is difficult for programming languages in general, and Java in particular, to support a 'Set' data type?

I can't seem to find a reason anywhere.

Thanks for any help.
0
Comment
Question by:nhay59
  • 2
  • 2
  • 2
  • +1
7 Comments
 
LVL 92

Expert Comment

by:objects
ID: 16756152
0
 
LVL 86

Assisted Solution

by:CEHJ
CEHJ earned 200 total points
ID: 16756156
Java *does* support it

0
 

Author Comment

by:nhay59
ID: 16756217
Hi,

Thanks for the replies. I was told that whilst programming languages in general do support 'Set' data types, it was difficult for them. Is this actually correct, and if so why would it be difficult to have a 'Set' data type in a programming language?

Thanks for the help.
0
What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

 
LVL 92

Assisted Solution

by:objects
objects earned 800 total points
ID: 16756239
no reason that I can think of. All you need is some way to define the uniquness of each instance. In Java equals() method is used.
0
 
LVL 14

Accepted Solution

by:
hoomanv earned 1000 total points
ID: 16756397
perhaps because we need a data structure, that should efficiently takes care of repeated elements to guarantee uniquness.
thats why HashSet, TreeSet, ... has been made
0
 
LVL 86

Expert Comment

by:CEHJ
ID: 16756444
:-)
0
 

Author Comment

by:nhay59
ID: 16756666
Hi,

Thanks for the replies and help. It is much appreciated.

Have a good week.
0

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In this post we will learn how to make Android Gesture Tutorial and give different functionality whenever a user Touch or Scroll android screen.
Basic understanding on "OO- Object Orientation" is needed for designing a logical solution to solve a problem. Basic OOAD is a prerequisite for a coder to ensure that they follow the basic design of OO. This would help developers to understand the b…
Viewers will learn about the regular for loop in Java and how to use it. Definition: Break the for loop down into 3 parts: Syntax when using for loops: Example using a for loop:
This tutorial will introduce the viewer to VisualVM for the Java platform application. This video explains an example program and covers the Overview, Monitor, and Heap Dump tabs.
Suggested Courses
Course of the Month17 days, 11 hours left to enroll

829 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question