Click here to Skip to main content
15,895,746 members
Home / Discussions / Java
   

Java

 
AnswerRe: Screen scrapping in java Pin
TorstenH.8-May-12 18:52
TorstenH.8-May-12 18:52 
AnswerRe: Screen scrapping in java Pin
User 759941417-Jun-12 3:05
User 759941417-Jun-12 3:05 
QuestionMethod in Java Pin
trongduy7-May-12 4:21
trongduy7-May-12 4:21 
AnswerRe: Method in Java Pin
ekolis7-May-12 5:27
ekolis7-May-12 5:27 
AnswerRe: Method in Java Pin
koropatva7-May-12 20:38
koropatva7-May-12 20:38 
AnswerRe: Method in Java Pin
Richard MacCutchan7-May-12 22:00
mveRichard MacCutchan7-May-12 22:00 
QuestionHow to remove Duplicates in ArrayList Pin
B.Bryce7-May-12 4:02
B.Bryce7-May-12 4:02 
AnswerRe: How to remove Duplicates in ArrayList Pin
ekolis7-May-12 5:31
ekolis7-May-12 5:31 
Enterprise is a class, so when you call

Java
array.add(new Enterprise("Micro System", 2001));


twice, you are actually adding two different Enterprise objects to array; they just happen to have the same data.

If you want the identical objects to be treated as if they were the same object, unfortunately I don't recall how HashSet does the comparisons, but I'm guessing you'll either have to override equals or hashCode on the Enterprise class.
GeneralRe: How to remove Duplicates in ArrayList Pin
BobJanova8-May-12 3:09
BobJanova8-May-12 3:09 
AnswerRe: How to remove Duplicates in ArrayList Pin
koropatva7-May-12 20:28
koropatva7-May-12 20:28 
QuestionEducational Imap client Pin
Pinifiux6-May-12 23:17
Pinifiux6-May-12 23:17 
AnswerRe: Educational Imap client Pin
TorstenH.7-May-12 1:07
TorstenH.7-May-12 1:07 
QuestionHashMap... am I doing it wrong? Pin
Stephen Dycus2-May-12 12:17
professionalStephen Dycus2-May-12 12:17 
AnswerRe: HashMap... am I doing it wrong? Pin
Stephen Dycus2-May-12 12:55
professionalStephen Dycus2-May-12 12:55 
GeneralRe: HashMap... am I doing it wrong? Pin
Peter_in_27802-May-12 13:06
professionalPeter_in_27802-May-12 13:06 
GeneralRe: HashMap... am I doing it wrong? Pin
Stephen Dycus2-May-12 13:07
professionalStephen Dycus2-May-12 13:07 
AnswerRe: HashMap... am I doing it wrong? Pin
Peter_in_27802-May-12 13:05
professionalPeter_in_27802-May-12 13:05 
GeneralRe: HashMap... am I doing it wrong? Pin
Stephen Dycus2-May-12 13:06
professionalStephen Dycus2-May-12 13:06 
Question-Xlint Pin
jigar - shah 22-May-12 7:06
jigar - shah 22-May-12 7:06 
AnswerRe: -Xlint Pin
Stephen Dycus2-May-12 7:45
professionalStephen Dycus2-May-12 7:45 
Questionproject for you Pin
silverbuyer1-May-12 18:39
silverbuyer1-May-12 18:39 
QuestionJava + OpenGL ES: Test for Transparency? Pin
Stephen Dycus1-May-12 15:38
professionalStephen Dycus1-May-12 15:38 
GeneralRe: Java + OpenGL ES: Test for Transparency? Pin
Stephen Dycus2-May-12 6:45
professionalStephen Dycus2-May-12 6:45 
QuestionJTables Implementation Pin
pawlu8929-Apr-12 1:53
pawlu8929-Apr-12 1:53 
AnswerRe: JTables Implementation Pin
BobJanova30-Apr-12 0:17
BobJanova30-Apr-12 0:17 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.