This question already has answers here:
What is the id=xxx next to variable entries in the Eclipse Debugger
(3 answers)
Closed 9 years ago.
What means (id=40) in Eclipse near variable PacketNr watch info? What this id is used for?
The ID is just an arbitary number assigned by the eclipse debugger. This can be used to determine whether two references are pointing to the same object or not. So two references to the same object should have a same id. This can be a help while debugging.
That is nothing but a unique object-id, eclipse assigns to objects.
It will just help in debugging.
Related
This question already has answers here:
While debugging java app what information is shown for a variable in a stack frame [duplicate]
(3 answers)
Closed 4 years ago.
What does 954 mean? I have checked both thread's id and hashcode(), but they don't equal 954.
Also, when using evaluate, there is also a number after #, I think they have the same meaning but still couldn't find out what's the meaning.
Interesting question. I just always took for granted that it is some id that uniquely identifies the object.
Based on that assumption it could for example be the uniqueId() returned by the Java Debugger Interface for an ObjectReference:
https://docs.oracle.com/javase/7/docs/jdk/api/jpda/jdi/
But that is really just an assumption.
This question already has answers here:
Is there a way to access an iteration-counter in Java's for-each loop?
(16 answers)
Closed 5 years ago.
Can we know the count of the iteration (that is whether it's the first, second, third ... iteration ) while we are stepping over the code in a for each loop, in the eclipse debugger? Eclipse must be holding a count but how to get it show it to us. Apart from the workarounds of introducing an index in the code can we utilize something in built in eclipse.
You can initiate a counter and increment it in the for loop, it should be a workaround.
You can track the variable under Eclipse console below:
This question already has answers here:
IntelliJ IDEA 12 code completion without capitalisation
(2 answers)
Closed 7 years ago.
Can IntelliJ Idea autocomplete my arraylist declaration if I
entered typename with lower case?
When I type ArrayL starting with capital letter I'm getting autocompletetion instantly.
But if I start typing arraylist with lowercase I can not get autocompletetion in any way. I tried ctrl-space, ctrl-shift-space but none of them works for me.
Maybe you can check this answer. Not sure if it is exactly the same currently, since this link refers to version 12 and current is 15:
IntelliJ IDEA 12 code completion without capitalisation
This question already has answers here:
Where is array's length property defined?
(7 answers)
Closed 7 years ago.
I have seen some examples of getting the length of an array using the field length, for example: array.length. I have always used this field but checking the array documentation I did not see that variable. Why is it that the documentation doesn't show it? It only shows a bunch of methods but I can't see the variable length. Is it in another class or what? I have seen questions like this before but the answers are not well explained so I can't understand them.
Because length is not actually a field. The compiler recognizes the identifier specially and translates it to an arraylength instruction rather than a getfield instruction.
This question already has answers here:
What is the meaning of $ in a variable name?
(2 answers)
Closed 7 years ago.
I've recently inherited an old Java application. Almost every variable has a $ at the end of it such as: String log$ = "job: " + task$;
As I understand it, using a $ in a variable violates Java's naming conventions. This is not a convention that's been used in other applications here either. When I asked around to find out why the application was written this way, I was told that the original developer's explanation was that the $ signals for immediate garbage collection as soon as the variable is out of scope.
I've been unable to find any sources that back up this explanation. Does anyone know if using a $ at the end of a variable has any special significance?
No, its a legal java identifier part, nothing more, nothing less