Win a copy of TDD for a Shopping Website LiveProject this week in the Testing forum!

Don Redd

Ranch Hand
+ Follow
since Jan 05, 2012
Don likes ...
Eclipse IDE Spring Java
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
9
Received in last 30 days
0
Total given
6
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Don Redd

Hi Sahil,

The output is guaranteed to be "4444"

At he end of first for loop in main method. the value of rabbit is 4 , since rabbit++ called only four times as there are only 4 threads running not 6 or 7


---Don Red

it is written that TreeSet is implemented using TreeMap
instance. What does it mean?



its simple

as per definition Set does not allow duplicates
and its implemented using Map as map doesn't allow duplicate keys.

here elements of set are same as keys of map inside set.

as similar to TreeSet and TreeMap combination you can check Hashset and HashMap combination

Regards,
Don..Red
What does "MAKE SHIFT ASSERTION MECHANISM "meant by?
Hi,
I am trying to understand behavior of System.in.read(byte[]) .

In the below code.



CONSOLE:
Ð
1
-48---11111111111111111111111111010000
Ð




Ð----is a character with Unicode value of U+0189 and its 2 byte or 16 bit representation is 0000 0001 1000 1001
Now , output of line2 says that , System.read has read 1 byte from console (std input) ,
Question 1 is which byte of Ð does it read , 0x01 or 0x89 ???
Question 2 is why is it printing -48 in line no 3.
Also i couldn't understand ,HOW String constructed 2 byte information Ð, even though it only read one byte?



9 years ago
Hi

Can some guide me how to get Java API for CA WorkLoad Automation, I have gone through CA.com site,but no luck.

Regards,
Don...
9 years ago
Hi Ranchers,

When ever I see a certification Results post, I used to think that when will be my day, and finally it is TODAY ;-).

I would like to thank all of you guys for helping me to achieve this.My special thanks goes to coderanch.com,


Regards,
Don.
9 years ago
Hi,

I have gone through some of good topics and thoughts posted related to this concept,But I am still unable to understand this behavior.




In the above code piece, this is how am thinking,
First: int has two choices to become a)long b)Integer then applying ...(var args) over widening or boxing.
Second: since widening beats boxing. int ==hast to become=====>long and var args are applied

and as per my thinking answer should be method(long... i){} ,but actual answer is ambiguity why?
enums declared inside class are implicitly static, so what ever the rules applied to static nested classes, applies to enum inside class, and in this example when you are accessing nested class(enum) outside enclosing class, you have to use <enclosingclassName>.

DOn...
Thanks Winston,For your suggestion...
9 years ago
The reason I think of is, you can't use generics inside Static methods...
1073741818 => 00111111 11111111 11111111 11111010
-24 ====> 11111111 11111111 11111111 11101000
-6 ====> 11111111 11111111 11111111 11111010

+24 ====> 00000000 00000000 00000000 00011000
+6 ====> 00000000 00000000 00000000 00000110

and you can use below URL to work out

http://docs.oracle.com/javase/tutorial/java/nutsandbolts/op3.html
9 years ago
Hi ,

From the time,I started working on Java. I am hearing about objects residing on heap,heap partitions, heap sizes,Garbage Collectors and etc etc.

But, it is still not clear to me about, How objects are structured like heap( heap is data structure which maintains some ordering ),In what order the objects are arranged,Why only heap and why not any other data structure,what benefits do heap gives?



Regards,
Don..
9 years ago