|
Apply Online for an Intern/Co-op position
Want to join us? Please take a short quiz and submit your resume. You may have to look up some of the answers for question 3. Quiz1. Suppose there are two empty 747s in NYC and LA, each about to head straight towards the other city at full speed, and there's no wind. If they both took off at the same time, over what state would they meet and approximately how many hours would it take them to meet? (This is not a trick question)
2. Assuming multiple threads will be accessing the 'Widget' class frequently, what is wrong with this scenario? Provide a revised implementation.
class Widget {
private int counter = 0;
public int getValue() {return counter;}
public void setValue(int x) {counter = x;}
...
}
public static void main(String[] args) {
Widget someWidget = new Widget();
...
while(someBoolean) {
int var = someWidget.getValue();
//Do something here that takes a little time
...
//Increment Widget counter
someObject.setValue( var + 1 );
}
}
3. A few questions on garbage collection:
a. How do you enable the concurrent garbage collector on Suns' JVM?
4. Write a program that finds the number that doesn't fit. You have the following data stored in a two dimensional array "xArray[][]"
What is the number that doesn't fit? |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Allston Trading, 440 S. LaSalle St., Suite 1200, Chicago, IL 60605 | 312-663-7111
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
© 2007 Allston Trading, LLC - All Rights Reserved |
Legal Information
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||