reset password
Author Message
CSr_esco525
Posts: 15
Posted 13:31 Mar 28, 2017 |

I have a really quick question if anyone does not mind answering, the first sentence on the MySet paragraph:

NOTE: Java has a built in Set class. You may NOT use this class or any of its methods. Also, you may not use any of the built in Java Collection classes inside of your MySet class. This means no ArrayLists, Lists, Maps, etc.

Does this mean we can not import an array utility? (import java.util.Arrays;)

Thank you for taking the time to read this message.

nickdrakesi
Posts: 11
Posted 13:52 Mar 28, 2017 |

I believe John upholds his directions, therefore, I'd say you can't use anything that is inside the Java Collection classes found here: [https://docs.oracle.com/javase/7/docs/api/java/util/Collections.html]. I am taking his instructions directly and not including any methods from any of the classes he specifies, everything else (to me) is free game.

This is the way I've been coding in his class and he hasn't said anything yet, just remember to comment that you understand something that isn't taught in the class before you use it. 

 

TLDR:

No usage of anything inside Set Class [https://docs.oracle.com/javase/7/docs/api/java/util/Set.html] or Java Collection [https://docs.oracle.com/javase/7/docs/api/java/util/Collections.html].

Last edited by nickdrakesi at 13:53 Mar 28, 2017.
jhurley
Posts: 207
Posted 14:24 Mar 28, 2017 |

I will make one exception: you can use Array.sort() in your .equals() method

nickdrakesi
Posts: 11
Posted 14:29 Mar 28, 2017 |
jhurley wrote:

I will make one exception: you can use Array.sort() in your .equals() method

So you are saying, we are able to useArray.sort() in order to display the matching integers, sorted into an order we determine? 

jhurley
Posts: 207
Posted 21:55 Mar 28, 2017 |

Yes, because this will make the equals() method much easier

boxxydog
Posts: 11
Posted 15:43 Apr 06, 2017 |

Does this mean I can not use Arrays.copyOf to copy the array without duplicates and create the new array?