Click here to Skip to main content
15,888,351 members
Home / Discussions / Java
   

Java

 
GeneralRe: How to make Integer number increment by 1 in a JTextField? Pin
chdboy27-Nov-13 1:29
chdboy27-Nov-13 1:29 
GeneralRe: How to make Integer number increment by 1 in a JTextField? Pin
Nicholas Marty27-Nov-13 4:07
professionalNicholas Marty27-Nov-13 4:07 
GeneralRe: How to make Integer number increment by 1 in a JTextField? Pin
chdboy27-Nov-13 18:12
chdboy27-Nov-13 18:12 
Questionconverter video Pin
Member 1041289519-Nov-13 16:29
Member 1041289519-Nov-13 16:29 
AnswerRe: converter video Pin
Marco Bertschi19-Nov-13 20:18
protectorMarco Bertschi19-Nov-13 20:18 
AnswerRe: converter video Pin
Bernhard Hiller19-Nov-13 22:06
Bernhard Hiller19-Nov-13 22:06 
QuestionWeb WCF Pin
SheraX19-Nov-13 5:11
SheraX19-Nov-13 5:11 
QuestionUnderstanding Java Integer Pin
Raptor8118-Nov-13 10:05
Raptor8118-Nov-13 10:05 
This may be a silly question for Java experts, but even for some one who has some years of Java experience like me, it is still an easily ignored topic. And even the senior developers on our team seem to make mistakes with these.

I want to understand the operators on the Java Integer class. What is Java doing when comparing two Integers? For example, let's say we have Integer a and Integer b. Does Java do reference comparison or value comparison on ==, !=, <, >, <=, >= operators?

And if one of the operator is an Integer and the other is a constant, what does Java do with ==, !=, <, <>, <=, >=?

And if one of the operator is an Integer and the other is an int, what does Java do?

In my experience, seems that Java does reference comparison with two Integers, and seems that it does value comparison with one Integer and one constant.

modified 18-Nov-13 16:13pm.

AnswerRe: Understanding Java Integer Pin
Richard MacCutchan18-Nov-13 22:28
mveRichard MacCutchan18-Nov-13 22:28 
GeneralRe: Understanding Java Integer Pin
jschell19-Nov-13 10:49
jschell19-Nov-13 10:49 
GeneralRe: Understanding Java Integer Pin
Richard MacCutchan19-Nov-13 21:41
mveRichard MacCutchan19-Nov-13 21:41 
AnswerRe: Understanding Java Integer Pin
jschell19-Nov-13 10:58
jschell19-Nov-13 10:58 
AnswerRe: Understanding Java Integer Pin
Oscar020-Nov-13 6:35
Oscar020-Nov-13 6:35 
Questiontrying to find the real import files Pin
tiwal17-Nov-13 21:10
tiwal17-Nov-13 21:10 
AnswerRe: trying to find the real import files Pin
Richard MacCutchan17-Nov-13 22:32
mveRichard MacCutchan17-Nov-13 22:32 
GeneralRe: trying to find the real import files Pin
tiwal17-Nov-13 23:35
tiwal17-Nov-13 23:35 
GeneralRe: trying to find the real import files Pin
Richard MacCutchan18-Nov-13 0:43
mveRichard MacCutchan18-Nov-13 0:43 
GeneralRe: trying to find the real import files Pin
tiwal18-Nov-13 1:18
tiwal18-Nov-13 1:18 
AnswerRe: trying to find the real import files Pin
Oscar020-Nov-13 6:54
Oscar020-Nov-13 6:54 
QuestionOpenGTS with eclipse Pin
Member 1026351915-Nov-13 23:54
Member 1026351915-Nov-13 23:54 
AnswerRe: OpenGTS with eclipse Pin
Richard MacCutchan16-Nov-13 0:17
mveRichard MacCutchan16-Nov-13 0:17 
GeneralRe: OpenGTS with eclipse Pin
Member 1026351916-Nov-13 0:43
Member 1026351916-Nov-13 0:43 
Questionhelp!!! seasar framework ... Pin
thetime110214-Nov-13 17:47
thetime110214-Nov-13 17:47 
AnswerRe: help!!! seasar framework ... Pin
Richard MacCutchan14-Nov-13 21:40
mveRichard MacCutchan14-Nov-13 21:40 
GeneralRe: help!!! seasar framework ... Pin
thetime110214-Nov-13 22:12
thetime110214-Nov-13 22:12 

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.