cancel BSNL hello tune (Ring Back Tune)



Just send BT DACT to 56700 or 567 you will get confirmation message soon


Read more

clear screen in java Example Sourcecode

In java there is no library package like clearscreen() in c to clear the standard output ,but I introduce here one trick to override the difficulty.This code not actually clear the screen,it overwrite the line printed in one line and start print  again in same line with the help of '\r'  - return

The code of the program is given below:(ClearScreen.java)
public class ClearScreen {

  
    public static void main(String[] args) {
        int i;
        for (i = 0; i <100; i++) {
       
            System.out.print("\r" + i);
            try {
                Thread.sleep(500);

            } catch (InterruptedException ie) {
                System.out.println(ie.getMessage());
            }
        }
    }
}





Read more

Delay in java

In this section we learn how we can make a program so that there are delay between the execution of program.

In this example we are using a sleep() method. We are passing 4000 to give the waiting time to our thread. This mean at execution time our program will wait for 4000 millisecond. The sleep() method can throws an InterruptedException .Show we must have write the sleep() method within try/catch block.   

The code of the program is given below:
public class DelayExample{
  public static void main(String[] args){
    System.out.println("Hi");
    for (int i = 0; i < 10; i++)
      {
      System.out.println("Number of itartion = " + i);
      System.out.println("Wait:");
      try
      {
        Thread.sleep(4000);        
             
            }catch (InterruptedException ie)
            {
        System.out.println(ie.getMessage());
            }
        }
    }
}



Read more