Monday, February 22, 2010

environmental problem

Well, I woke up today and found that my system simply refuse to behave normally. I tried to run ant command from command prompt and Windows spit an error message "ant is not recoginzed as internal or external command", so was the problem with edit, del, copy, shutdown and everything. When i try to ran eclipse i got a message saying "Java is not installed".

I immediately checked the Path environment variable and it was perfect. I double checked all the paths in the Path variable, everything was fine. It had all the paths from system, system32, java and everything. I was wondering then what could the problem be... After a while i renamed the path environmental variable from "Path" to "PATH" and whooosh everything started working as it was.... Finally was able to resolve the environmental problem :)

This all was happening with my Windows XP SP3 box :) Glad that its working again ...

Fn keys problem or a feature.

Had got a new USB keyboard for my laptop (might sound weired), but I needed a separate numeric keypad hence had to get a new keyboard. After few days of plugging in the keyboard and using the num pad, the keyboard on my laptop started to behave weird.

If i press o i used to ket 6,if I pressed p i used to get *. Finally i realized that there was a virtual numeric keypad on my laptop keyboard. i. And the way to switch it on/off was to toggle Fn + NumLck or Fn + ScrLk..... never focussed on those keys till now :)

Well now my new USB keyboard looks obsolete.

Tuesday, February 2, 2010

Set 4

1. Write an algorithm to implement linked list.
2. Given an unsorted array with characters or digits, write an algorithm to print the number of occurrences of each item in array. a) Sort b) Without sorting
3. Given an array of integers, reverse the array without using temporary variables/sapce.
4. In JSP , who maintains the session and how is it maintained internally?
5. Explain URL Rewriting.
6. Explain Self Join with example.

Tuesday, January 26, 2010

Set #3

1. Explain the current project, your roles, tools and technology used.
2. Explain Singleton pattern. And how can you optimize it. Double Checked Singleton.
3. Write pseudo code for Stack Implementation.
4. Explain deadlock.
5 Explain synchronization.
6. Explain ConcurrentModificationException.
7. What you think about when you write multi threaded applications ?
8. What is the difference between single and multi threaded ?
9. Static initializer block intialize i to 10
Initialize i to 20 in constructor
In main Print values of i , instantiate and then print iagain.
10. In a HashMap:
String a = "xx", b="yy", c="zz"
HashMap x = new HashMap();
x.put(a,"1");x.put(b,"1");x.put(c,"1");
a = "lsi"
If the value of one of the keys say 'a' is changed , will the key value in hash map change?
11. In a single linked list there is a pointer to node x , how do you delete it?
12. An large array of consiting of only 1s 2s , how do you sort it in 0(n) time complexity?

Monday, January 18, 2010

Wednesday, January 13, 2010

Set #2

Here is another set.

1. Brief Introduction?

2. Explain your latest project, how does it work?

3. Explain Aggregation, Composition and Association with examples?

4. In case you have a huge data set and need really fast insertion and retrieval, which data structure can be used?

5. Write a program to reverse a number without using library functions.

6. Explain JVM Class loading?

7. Suppose you have app server which has multiple web applications. Each web application has its own version of say jdom.jar how does the app server handle this scenario?

8. Explain tag handler class life cycle.

9. What is the purpose of tld’s, tags?

10. Explain nesting of tags in case of JSPs. Custom tags?

Set #1

Here is the first set, hope more will follow.

1. Brief introduction?

2. What is the difference between method overloading and method overriding? Can we override methods with different return types?

3. What is the difference between Hashtable and HashMap?

4. What is TreeMap?

5. Which data structure one can use for fast insertion and fast deletion?

6. What is the significance of equals () and hashCode () when using HashMap ?

7. Explain wait () notify () and notifyAll ()?

8. What happens after the sleep () returns? Can one thread cause another thread to sleep?

9. Do static fields get serialized?

10. What are the differences between public and protected keywords?

11. How can you make class immutable? Deep Copy.

12. What is auto boxing?

13. Which data structure is used in buckets in HashMap?

Twitter Updates

    follow me on Twitter