About 491,000 results
Open links in new tab
  1. IntFunction (Java Platform SE 8 ) - Oracle

    Represents a function that accepts an int-valued argument and produces a result. This is the int -consuming primitive specialization for Function. This is a functional interface whose functional method is apply(int).

  2. IntFunction Interface in Java with Examples - GeeksforGeeks

    Oct 8, 2018 · The IntFunction Interface is a part of the java.util.function package which has been introduced since Java 8, to implement functional programming in Java. It represents a function which takes in an int-valued argument and produces a result of type R.

  3. Integer (Java Platform SE 8 ) - Oracle

    The Integer class wraps a value of the primitive type int in an object. An object of type Integer contains a single field whose type is int.

  4. Function Interface in Java - GeeksforGeeks

    Apr 16, 2025 · The Function Interface is a part of the java.util.function package that has been introduced since Java 8, to implement functional programming in Java. It represents a function that takes in one argument and produces a result. Hence, this functional interface takes in 2 generics, namely as follows:

  5. java - How to call a method using integer - Stack Overflow

    Jul 14, 2012 · When you call displayResult in main, you need to actually pass it values, rather than repeat the types and names of the arguments. For example: displayResult(2, 3); That should work, but it still won't do anything; displayResult returns the result, but it doesn't print it or do anything else with it.

  6. Java IntFunction

    In Java, the IntFunction interface is a functional interface that represents a function that accepts an int -valued argument and produces a result. It is part of the java.util.function package and is commonly used for operations that transform or process int values into other types.

  7. Returning Integer Values in Java - Stack Overflow

    Apr 17, 2013 · I'll explain the multiple branches with a couple examples: public int someMethod(int i) { if(i == 0) { return i; } } This method will not compile due to the fact that what happens if i is not equal to 0, the compiler does't know how to return the method. To fix this, either add an else, or a final return statement, either of these will work.

  8. Java IntFunction Interface Examples - Online Tutorials Library

    Jul 20, 2023 · Explore the IntFunction interface in Java with examples. Learn how to use this functional interface for lambda expressions and method references.

  9. Java IntFunction Interface - Complete Tutorial with Examples

    Apr 16, 2025 · The java.util.function.IntFunction interface represents a function that accepts an int-valued argument and produces a result. It is a functional interface with a single abstract method apply. IntFunction is specialized for primitive int inputs to avoid boxing overhead. IntFunction is part of Java's functional programming utilities added in Java 8.

  10. IntFunction in Java 8 With Code Sample - LearnJava

    Aug 12, 2020 · IntFunction is an in-built functional interface in the java.util.Function package. It accepts an argument of int data type, operates on it and produces a result of any data type.

  11. Some results have been removed
Refresh