Filter
Exclude
Time range
-
Near
共通処理を作り込むのは趣味みたいなものなんだけど、 最近のそれは半ばFWコードなのでちょっとやりすぎてる感じがある。FWがReflection使ってるところをFunctionalInterfaceで代替してるだけだこれみたいな感じ
2
30
其实不像是,更像是本来是多元函数method(a,b,c),但我们一时只想给a填a0然后就弄了个tempMethod(b,c)=method(a0,b,c) 不过我们还指定填写顺序,比如必须先a后b最后c这样拆而不能交换,要是有@FunctionalInterface的概念应该更好理解,因为返回的是这种玩意
1
2
52
Day 1 Finally got the error handling working I had to create a FunctionalInterface as "bridge" (Controller - View) since the AddEventListener method of Swing doesn't have a signature for throwing exceptions. Do you know a better solution for this? #java #100daysofcode #java
1
2
83
If you are appearing for Java interviews in 2026, Java 8 should be one topic that you need to prepare extensively. Interview questions: LAMBDA & FUNCTIONAL INTERFACE 1. What is a functional interface? 2. Is @FunctionalInterface mandatory? 3. Can a functional interface have default methods? 4. Why were lambdas introduced? 5. Lambda vs anonymous class STREAM API (MOST IMPORTANT) 6. Stream vs Collection 7. Intermediate vs Terminal operations 8. map() vs flatMap() 9. filter() vs map() 10. findFirst() vs findAny() 11. limit() vs skip() 12. peek() – real use case 13. forEach vs forEachOrdered 14. reduce() explained with example 15. collect() – internal working 16. groupingBy() vs partitioningBy() 17. How to remove duplicates using Stream? 18. Parallel stream – when NOT to use? 19. Stream performance vs for-loop 20. Can we reuse a stream? 21. Lazy evaluation in streams OPTIONAL (Tricky area) 22. Why Optional was introduced? 23. orElse vs orElseGet 24. Can Optional be null? 25. Is Optional Serializable? 26. Best practices for using Optional in APIs DEFAULT & STATIC METHODS (Interfaces) 32. Why default methods were introduced? 33. Multiple interface default method conflict – how resolved? 34. Can a default method be overridden? ' 35. Static methods in interface – use case? DATE & TIME API 27. Date vs LocalDate 28. LocalDate vs LocalDateTime 29. ZonedDateTime – real use case 30. How to convert String to LocalDate? 31. Thread safety of Java 8 Date-Time API
8
54
296
14,452
9 Dec 2025
Road to Java Engineer — Day 4 🔥 Finally got a solid grip on annotations and how @FunctionalInterface powers lambda expressions. Java is starting to feel smoother! 💻⚡ #JavaProgramming #100DaysOfCode #BuildInPublic #Lambda #TechTwitter #DevCommunity
3
17
Java quiso tener lambdas, pero sin romper la JVM ni reescribir 20 años de APIs. ¿La solución? Fingir que Java tiene funciones de primera clase usando algo que ya existía: interfaces con un único método abstracto. Así nacieron las functional interfaces. @ FunctionalInterface interface Operacion { int aplicar(int x, int y); } Operacion sumar = (a, b) -> a b; System.out.println(sumar.aplicar(3, 4)); // 7 Aquí parece que pasas una función… pero no: El compilador genera una instancia de Operacion. No existe una función suelta como en JavaScript o Kotlin. Esto se usa hoy en día incluso con clases "viejas" del lenguaje: Runnable existe desde Java 1.0 con un solo método (run). Cuando Java 8 introdujo lambdas, ya se podía hacer esto: new Thread(() -> System.out.println("Hola desde un hilo")).start(); Las implementaciones anteriores como Thread(Runnable r) siguieron funcionando sin tocar una línea de la API original. Esto fue clave para no romper el ecosistema y mantener la estabilidad que caracteriza a Java.
1
18
4,200
¿Ya conoces las interfaces funcionales en Java? 👇 Es una interfaz que tiene exactamente un método abstracto, y aunque parezca algo menor, cambió mucho la forma en que escribimos Java. Antes de Java 8, pasar una acción como parámetro implicaba crear clases anónimas larguísimas. Con las interfaces funcionales, Java empezó a tratar el código como datos, ahora puedes pasar acciones (no solo objetos) a tus métodos. El rol de la anotación @ FunctionalInterface no es ejecutar nada, sino garantizar que la interfaz cumpla la regla de tener un único método abstracto. Si agregas más de uno, el compilador marcará error. Es una forma de documentar intención y prevenir errores futuros. Veamos un ejemplo antes y después de Java 8 👀
1
9
650
Javaのラムダ式とは?「匿名クラスで実装した関数型インターフェースの記述を省略したもの」です。理解するには関数型インターフェースと匿名クラスについての理解が不可欠です。 関数型インターフェースとは、単一の抽象メソッドを持つインターフェースのことで、@FunctionalInterfaceアノテーションで宣言されます。匿名クラスは、クラス定義とインスタンス化を同時に行う方法です。ラムダ式はこれらを簡潔に記述できるよう導入された構文です。
4
237
🚀 Java API Tip 🚀 Use @FunctionalInterface as compiler safeguard! It helps prevent accidental addition of multiple abstract methods to an interface marked as functional. If you try to add another abstract method to a functional interface, the compiler will produce an error.🔥
7
69
1,796
What is the output ? @FunctionalInterface public interface Parent { void test(); } @FunctionalInterface public class Child implements Parent { }
56% Compilation error
33% Compiles and runs success
10% Runtime exception
39 votes • Final results
4
493
Replying to @driverpt
Code will compile, @FunctionalInterface annotation is not required as the interface has only one abstract method
2
68
28 Feb 2025
Functional Interfaces in Java are a game-changer for writing clean and concise code! 🚀 In my latest video, I break down what Functional Interfaces are, how they work, and how you can leverage them effectively with real Java class examples..🧑‍💻 If you’re looking to master lambda expressions and streamline your Java code, this video is for you. 👉 Check it out here! 📌 youtu.be/hYw9Og4GkA8 #Java #FunctionalInterface #LambdaExpressions #Coding #SoftwareEngineering #Bitbee #Programming
1
1
2
66
28 Feb 2025
Functional Interfaces in Java are a game-changer for writing clean and concise code! 🚀 In my latest video, I break down what Functional Interfaces are, how they work, and how you can leverage them effectively with real Java class examples..🧑‍💻 If you’re looking to master lambda expressions and streamline your Java code, this video is for you. 👉 Check it out here! 📌 youtu.be/hYw9Og4GkA8 #Java #FunctionalInterface #LambdaExpressions #Coding #SoftwareEngineering #Bitbee #Programming
1
5
22
3,003
28 Feb 2025
Functional Interfaces in Java are a game-changer for writing clean and concise code! 🚀 In my latest video, I break down what Functional Interfaces are, how they work, and how you can leverage them effectively with real Java class examples..🧑‍💻 If you’re looking to master lambda expressions and streamline your Java code, this video is for you. 👉 Check it out here! 📌 youtu.be/hYw9Og4GkA8 #Java #FunctionalInterface #LambdaExpressions #Coding #SoftwareEngineering #Bitbee #Programming
1
3
19
703
@ FunctionalInterface, the annotation of #Java & the purpose of it is, to be able to create an interface with one non-default method. So, that the interface can simulate functions being first-class ctzn in the OOP language.
1
8
229
🚀 Java API Tip 🚀 Use @FunctionalInterface as compiler safeguard! It helps prevent accidental addition of multiple abstract methods to an interface marked as functional. If you try to add another abstract method to a functional interface, the compiler will produce an error.🔥
1
8
81
2,565
Did you know? If an interface is marked with @FunctionalInterface in Java, you can only write one abstract method. Adding another causes a compilation error. Without @FunctionalInterface, multiple abstract methods are allowed, but lambda expressions fail during compilation!
1
8
436
22 Nov 2024
A functional interface in Java: - Has exactly one abstract method. - Can be annotated with @FunctionalInterface. - May include default and static methods. - Enables use of lambda expressions and method references. Some importantFunctional Interfaces👇
1
33
264
15,479
20 Oct 2024
Here are some lesser-known tips for JAVA PROGRAMMING that can help improve your coding practices: 1. Use Optional: Avoid nulls with Optional<T> to prevent NullPointerExceptions. 2. Immutable Objects: Create immutable classes using final fields for better reliability. 3. Varargs: Use variable-length arguments (int... numbers) for flexible method parameters. 4. Static Imports: Simplify code with static imports for constants and methods. 5. Stream API: Utilize streams for concise collection processing (filtering, mapping). 6. Concurrent Collections: Use ConcurrentHashMap for thread-safe operations. 7. Custom Annotations: Add metadata with custom annotations for clarity. 8. Default Methods: Use default methods in interfaces for backward compatibility. 9. Functional Interfaces: Apply FUNCTIONALINTERFACE to clarify single-method interfaces. 10. Soft References: Use SoftReference for caching without risking memory issues. 11. Java Modules: Explore JPMS for modular application design in Java 9 . 12. Builder Pattern: Implement the Builder pattern for creating complex objects.
44
32
50
2,921