Java 19120 Code review changes (#13747)

* JAVA-19120 Move article Lambda Expression vs. Anonymous Inner Class to core-java-8-2 module

---------

Co-authored-by: Anastasios Ioannidis <[email protected]>
This commit is contained in:
anuragkumawat
2023-04-20 18:40:19 +03:00
committed by GitHub
co-authored by Anastasios Ioannidis
parent 721d287b5d
commit b7ea8e622d
4 changed files with 1 additions and 1 deletions
@@ -0,0 +1,14 @@
package com.baeldung.anonymousclass;
public class AnonymousClassExample{
public static void main(String[] args){
Thread t1 = new Thread(new Runnable(){
@Override
public void run() {
System.out.println("Thread: "+Thread.currentThread().getName()+" started");
}
});
t1.start();
}
}
@@ -0,0 +1,9 @@
package com.baeldung.lambdaexpression;
public class LambdaExpressionExample{
public static void main(String[] args){
Thread t1 = new Thread(()->System.out.println("Thread: "+Thread.currentThread().getName()+" started"));
t1.start();
}
}