Menu
Question Index
...


Write a program to get the list of five times at which the bell rings.

Input (String) Output (ArrayList of Strings)
25 Jan 2013 11:25 [Jan 25 2013 11:25, Jan 25 2013 11:38, Jan 25 2013 11:51, Jan 25 2013 12:04, Jan 25 2013 12:17]
Nov 14 2015 23:20 [Nov 14 2015 23:20, Nov 14 2015 23:33, Nov 14 2015 23:46, Nov 14 2015 23:59, Nov 15 2015 00:12]
Aug 15 2013 08:23 [Aug 15 2013 08:23, Aug 15 2013 08:36, Aug 15 2013 08:49, Aug 15 2013 09:02, Aug 15 2013 09:15]
Jun 19 2011 17:55 [Jun 19 2011 17:55, Jun 19 2011 18:08, Jun 19 2011 18:21, Jun 19 2011 18:34, Jun 19 2011 18:47]

class RingBellFiveTimes

{    public static void main(String s[])
    {
        System.out.println("Timings are :");
        ArrayList ringingTimes = ringBellFiveTimes("Jun 19 2011 17:55");
        for (String ringingTime : ringingTimes)
        System.out.println(ringingTime);

    }


public static ArrayList<String> ringBellFiveTimes(String startingTime) {
//Write code here to get the list of five times at which the bell rings and return it.
}
}

Doubts

Problems

Topic: Locale Class In Java

Read this topic
Take test on this topic

0
Wrong
Score more than 2 points

© meritcampus 2019

All Rights Reserved.

Open In App