Сообщения

Сообщения за апрель, 2023

Microservice_Lesson_1: Introduction to Microservice

 1. Mikroservis avtonom iwleyen servislerdir, hansilarki bir birinden xirda wekilde asilidir. Maksimum derecede bir birinden biznes logic terefden asili olmayan servislere mikroservis deyilir.

Lambda expressions

 Lambda expression is Anonymous function. Anonymous function means: 1) does not have name - nameless 2) does not have return type 3) does not have access modifier -> Functional interfaces must have only and only abstract method.  -> Lambda expressions can be invoked only through functional interfaces. -> simple functional interface package org.example.lambdaExpressions ; @FunctionalInterface public interface Cab { void bookCab () ; } package org.example.lambdaExpressions ; public class Ola implements Cab { @Override public void bookCab () { System . out .println( "Ola cab is booked" ) ; } } package org.example.lambdaExpressions ; public class Main { public static void main ( String [] args ) { Ola ola = new Ola() ; ola .bookCab() ; Cab cab = new Ola() ; cab .bookCab() ; } } There is no need to initialize class and implement this functional interface. Simplest way to do it is: package org.example.lambdaEx