jesse

Greenhorn
+ Follow
since Oct 10, 2000
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
In last 30 days
0
Forums and Threads

Recent posts by jesse

public class test{
public static void main(String args[]){
byte x=3;
x=(byte)~x;
System.out.println(x);
}
}
A. 3
B. 0
C. 1
D. 11
E. 252
F. 214
G. 124
H. -4
The correct answer was given as H. The answer i got was -124. Could someone please explain this question to me.
I was wondering what would happen if:
I have a thread that has a lock on a synchronized method. This thread never dies (is in a continual while loop)and is only put to sleep. So as i understand it this thread should never give up its lock. If this thread never gives up its lock on the synchronized method what will happen if i continue to create new threads. can there be too many threads in a ready state? how long will it take to crash???
if someone can help me out i would really appreciate it!!
question 4)
the answer is a, a map uses a unique key which enables searching