import java.util.function.*;
class Movie {
String name;
Movie(String name) {
this.name = name;
}
}
class MovieInfo {
public static void main(String[] args) {
Consumer<Movie> c1 = m ->
System.out.println(m.name + " moive" + " is Ready to Release");
Consumer<Movie> c2 = m ->
System.out.println(m.name + " movie" + " is a Big Flop");
Consumer<Movie> c3 = m ->
System.out.println(
m.name + " movie" + " details are being stored in databasae"
);
Consumer<Movie> cc = c1.andThen(c2).andThen(c3);
Movie m = new Movie("Spider");
cc.accept(m);
}
}