All function algoritm implemented with Java
- Open
projectwith yourAndroid Studio IDEApp - Open package
id.septiyadi.buildalgoritma (test) - Then open the collection file you want to test and see the output
Below is a collection that we have created and can / friends use on some of the code blocks of the program that you are making
Get date and time
@TimeAndDate.java > getTodayDate
@Test
public void getTodayDate() {
SimpleDateFormat format = new SimpleDateFormat("dd/MM/yyyy HH:mm:ss");
Date today = new Date();
String todayTime = format.format(today);
System.out.print(todayTime);
}Output
28/10/2021 05:23:36