check get time and current time in android studio code example
Example: android studio get time
String currentTime = new SimpleDateFormat("HH:mm:ss", Locale.getDefault()).format(new Date());
String currentTime = new SimpleDateFormat("HH:mm:ss", Locale.getDefault()).format(new Date());