forked from Parallele_Programmierung/Labs
reformat source code
parent
daf6e7341d
commit
c89682b3fb
|
|
@ -13,12 +13,14 @@ public class Main {
|
|||
return 1.0 + 2.0;
|
||||
});
|
||||
// Callable als Inner Class
|
||||
var f2 = executor.submit(new Callable<Double>() {
|
||||
@Override
|
||||
public Double call() throws Exception {
|
||||
return 3.0 + 4.0;
|
||||
var f2 = executor.submit(
|
||||
new Callable<Double>() {
|
||||
@Override
|
||||
public Double call() throws Exception {
|
||||
return 3.0 + 4.0;
|
||||
}
|
||||
}
|
||||
});
|
||||
);
|
||||
// Lambda-Ausdruck, knapp
|
||||
var f3 = executor.submit(() -> f1.get() + f2.get());
|
||||
try {
|
||||
|
|
|
|||
Loading…
Reference in New Issue