My Blog

All about my activities, Ideas and everything.

Month: November, 2009

Java : Why do want to new different objects from one class

I was asked this once. Why do we need to new object every time we want to use it. Yes, my first answer is, we need different objects because we need to use them separately because they are on different locations in Heap memory. However, this is not actually the answer. So, why do we [...]

How to use java.util.Timer to repeat the task

This is how I do it. 1234567891011121314151617181920212223242526272829import java.util.Timer; import java.util.TimerTask; /**  *  * This class uses the java.util.Timer functionality  * The class will repeat itself every second.  *  * @author Toy  */ public class Main {     public static void main(String[] args) throws Exception     {         int delay = [...]

How to filter only unread emails in Googlemail

Well, I know that everybody knows this technique already. But I don’t know that before, I have just moved all of my email accounts to Google Mail. And It’s fab. However, when Google Mail downloaded my emails already. They are marked as Unread. How do I filter all my emails and show only unread email? [...]