Microsoft Java Written Test
Java
1. How do you find the size of a java object (not the primitive type) ?
ANS. type cast it to string and find its s.length()
2. Why is multiple inheritance not provided in Java?
3. Thread t = new Thread(); t.start(); t = null; now what will happen to the created thread?
4. How is garbage collection done in java?
5. How do you write a "ping" routine in java?
6. What are the security restrictions on applets?
Graphics
1. Write a function to check if two rectangles defined as below overlap or not. struct rect { int top, bot, left, right; } r1, r2;
2. Write a SetPixel(x, y) function, given a pointer to the bitmap. Each
pixel is represented by 1 bit. There are 640 pixels per row. In each
byte, while the bits are numbered right to left, pixels are numbered left
to right. Avoid multiplications and divisions to improve performance.
Questions by Beena answers by Beena
Showing Answers 1 - 2 of 2 Answers
Related Answered Questions
Related Open Questions
Microsoft Java Written Test
1. How do you find the size of a java object (not the primitive type) ?
ANS. type cast it to string and find its s.length()
2. Why is multiple inheritance not provided in Java?
3. Thread t = new Thread(); t.start(); t = null; now what will happen to the created thread?
4. How is garbage collection done in java?
5. How do you write a "ping" routine in java?
6. What are the security restrictions on applets?
Graphics
1. Write a function to check if two rectangles defined as below overlap or not. struct rect { int top, bot, left, right; } r1, r2;
2. Write a SetPixel(x, y) function, given a pointer to the bitmap. Each
pixel is represented by 1 bit. There are 640 pixels per row. In each
byte, while the bits are numbered right to left, pixels are numbered left
to right. Avoid multiplications and divisions to improve performance.
Questions by Beena answers by Beena
Related Answered Questions
Related Open Questions