Rameshwar Soni wrote:Now my question is how come we store values in array when it is not created in memory?
Rameshwar Soni wrote:
(2)
My question is why ? is coming for both 600 and 858 and even if i put no like 900 or 957 it gives ? as output
Thanks in advance
Please correct my English.
Angus Comber wrote:
Primitives in Java are stored on the stack. This is a different area of memory to the heap - but it is still stored in memory. You should definitely get stack and heap clear in your mind - very important computer science concepts.
Please correct my English.
Jacek Garlinski wrote:one of String's constructor is String(byte[] bytes, int offset, int length) - so as first argument it takes array of bytes.
When you pass your array, its values are casted to bytes and then for each value ascii representation is taken - so 65 is letter A, and 66 is letter B.
Rameshwar Soni wrote:
Jacek Garlinski wrote:one of String's constructor is String(byte[] bytes, int offset, int length) - so as first argument it takes array of bytes.
When you pass your array, its values are casted to bytes and then for each value ascii representation is taken - so 65 is letter A, and 66 is letter B.
String also has an constructor which takes an integer array so there is no need to convert from int to bytes
Please correct my English.
SCJP 1.4 - SCJP 6 - SCWCD 5 - OCEEJBD 6 - OCEJPAD 6
How To Ask Questions How To Answer Questions
The contents of the subarray are converted to chars;
SCJP 1.4 - SCJP 6 - SCWCD 5 - OCEEJBD 6 - OCEJPAD 6
How To Ask Questions How To Answer Questions
SCJP 1.4 - SCJP 6 - SCWCD 5 - OCEEJBD 6 - OCEJPAD 6
How To Ask Questions How To Answer Questions