Q:

Adding 1,15,30 or 45 minutes to currentTimeMillis()

does anyone know how to add minutes to currentTimeMillis. i am passing an integer t, which is how many minutes users would like to add to the currentTimeMillis() time_int. Is this possible in java? can anyone show me?    
  public void radioStartTime(int t)
    {
    time_int =(int)System.currentTimeMillis(); //casting long into int. 
    System.out.println(time_int);
    }

A:

Well, given that there are 1,000 milliseconds in a second and 60 seconds in a minute, you need to add 60,000 for each minute.
Hence:
Add n minutes, n =               Add
       1                      60,000
      15                     900,000
      30                   1,800,000
      45                   2,700,000

I'd also be a little wary of converting the return value from currentTimeMillis() back to an int data type, you may want to keep it as a long so there's less chance of losing range.

