Do i have any advantage while using functional style in my below example case
I have a below method
public static String someMethod(String source) {
//some operation
return source;
}
I changed above method to below style.
public static Function<String,String> process = source -> {
//some operation
return source;
}
What are the advantages do i get for above change including performance at run time?