Refactored code to use generic methods and use streams. (#10052)
This commit is contained in:
@@ -0,0 +1,19 @@
|
||||
package com.baeldung.reflection.check.staticmethods;
|
||||
|
||||
import java.time.LocalDate;
|
||||
import java.time.LocalTime;
|
||||
|
||||
public class StaticUtility {
|
||||
|
||||
public static String getAuthorName() {
|
||||
return "Umang Budhwar";
|
||||
}
|
||||
|
||||
public static LocalDate getLocalDate() {
|
||||
return LocalDate.now();
|
||||
}
|
||||
|
||||
public static LocalTime getLocalTime() {
|
||||
return LocalTime.now();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user