Is there a difference between these lines of code, and what is best to use it? thanks
public static void main( String[] args ){
SwingUtilities.invokeLater( () -> component.method() ); }
vs
public static void main( String[] args ) {
SwingUtilities.invokeLater( new Runnable() {
public void run(){
component.method();
}} );
}
or
public static void main( String[] args ) {
SwingUtilities.invokeLater( new Runnable() {
public void run(){
component::method();
}} );
}