Per the java.util.function Javadoc,

Since:
      1.8

So upgrade to Java 8, or try to find an older version of the tutorial.

I'm new at this. How can you tell what you are running? I'm using Eclipse

To determine your current Java version in eclipse, go to

Help -> About Eclipse -> Installation Details (Button in
          lower Left) -> Configuration pane

Look for the line java.specification.version - on my machine that is

java.specification.version=1.8

Or the line java.runtime.version - on my machine that is

java.runtime.version=1.8.0_11-b12
Answer from Elliott Frisch on Stack Overflow
🌐
Team Treehouse
teamtreehouse.com › community › junit5-fail-returns-error-java-cannot-access-javautilfunctionsupplier
JUnit5: 'fail();' returns error: "java: cannot access java.util.function.Supplier..." (Example) | Treehouse Community
August 1, 2021 - So I'll answer this myself as I have figured it out, in case it helps anyone else going forwards. Google told me: "Supplier<T> is an in-built functional interface introduced in Java 8 in the java.util.function package"
🌐
GitHub
github.com › spring-projects › spring-ai › issues › 1277
Support for registering Supplier functions in addition to Function interfaces for LLM function calling · Issue #1277 · spring-projects/spring-ai
August 27, 2024 - By supporting Supplier functions, Spring AI would allow for more dynamic and versatile function calling capabilities in LLM-powered applications. These functions are essential for generating real-time or context-dependent data without requiring any input parameters. ... Currently, it appears that Spring AI only supports registering functions that implement the java.util.function.Function interface for LLM function calling.
Author   spring-projects
🌐
Bug Database
bugs.java.com › bugdatabase › view_bug.do
Bug ID: JDK-8144169 Unable to infer correct functional interface for overloaded void method
FULL PRODUCT VERSION : java version "1.8.0_60" Java(TM) SE Runtime Environment (build 1.8.0_60-b27) Java HotSpot(TM) 64-Bit Server VM (build 25.60-b23, mixed mode) ADDITIONAL OS VERSION INFORMATION : Microsoft Windows [Version 10.0.10240] A DESCRIPTION OF THE PROBLEM : Consider an overloaded method that takes two different functional interfaces as parameters (`Runnble` and `Supplier`). `System.out.println` is clearly only compatible with `Runnable`, because it is a `void` method. javac agrees, reporting an error that explicitly notes that the return type of `Supplier` cannot be converted to void. Yet javac still claims in a separate error that the call is ambiguous and matches both `Runnable` and `Supplier`. Note that both lambda `() -> {}` and method reference `System.out::flush` are able to resolve.
🌐
Spring
docs.spring.io › spring-integration › reference › functions-support.html
java.util.function Interfaces Support :: Spring Integration
Because of Java type erasure we cannot determine the target type for the apply()/accept() method call. The java.util.function.Supplier interface can simply be used together with the @InboundChannelAdapter annotation, or as a ref in an <int:inbound-channel-adapter>:
Find elsewhere
🌐
OpenJDK
bugs.openjdk.org › browse › JDK-8144169
Loading...
November 26, 2015 - FULL PRODUCT VERSION : java version "1.8.0_60" Java(TM) SE Runtime Environment (build 1.8.0_60-b27) Java HotSpot(TM) 64-Bit Server VM (build 25.60-b23, mixed mode) ADDITIONAL OS VERSION INFORMATION : Microsoft Windows [Version 10.0.10240] A DESCRIPTION OF THE PROBLEM : Consider an overloaded method that takes two different functional interfaces as parameters (`Runnble` and `Supplier`). `System.out.println` is clearly only compatible with `Runnable`, because it is a `void` method. javac agrees, reporting an error that explicitly notes that the return type of `Supplier` cannot be converted to void. Yet javac still claims in a separate error that the call is ambiguous and matches both `Runnable` and `Supplier`. Note that both lambda `() -> {}` and method reference `System.out::flush` are able to resolve.
🌐
GitHub
github.com › SeleniumHQ › selenium › issues › 3596
Compilation error after update Function/Predicate imports from Guava to Java 8 · Issue #3596 · SeleniumHQ/selenium
March 3, 2017 - I could not use the 3.1.0 and 3.2.0 versions. It breaks the compilation of this code from my tests (in Scala): · As far as I could see, recently there was a change in FluentWait class where the Function, Predicate and Supplier imports were changed to use Java 8, instead of Guava
Author   SeleniumHQ
🌐
Stack Overflow
stackoverflow.com › questions › 71575641 › jlanguage-does-not-implement-the-requested-interface-java-util-function-supplier
spring boot - Jlanguage does not implement the requested interface java.util.function.Supplier - Stack Overflow
March 22, 2022 - 2022-03-22 21:42:22.767 ERROR 22612 --- [nio-8080-exec-2] o.a.c.c.C.[.[.[/].[dispatcherServlet] : Servlet.service() for servlet [dispatcherServlet] in context with path [] threw exception [Handler dispatch failed; nested exception is java.lang.IncompatibleClassChangeError: Class com.google.common.base.Suppliers$NonSerializableMemoizingSupplier does not implement the requested interface java.util.function.Supplier] with root cause java.lang.IncompatibleClassChangeError: Class com.google.common.base.Suppliers$NonSerializableMemoizingSupplier does not implement the requested interface java.util.f
🌐
Stack Overflow
stackoverflow.com › questions › 4322893 › eclipse-error-the-import-xxx-cannot-be-resolved › 40126414
java - Eclipse error: "The import XXX cannot be resolved" - Stack Overflow
I think the JavaSE-14 may not have been installed or something because it said (unbound) but the rest of the versions had a longer Java version name and number within the parentheses · I hope it helps somebody. ... Open the .classpath file of your project : vim .classpath. Within vim, use :MvnRepo to initialize the Maven Eclim plugin. This will set M2_REPO. Note that this step *has to be performed while editing the .classpath file (hence step 1). Update the list of dependencies with :Mvn dependency:resolve.
🌐
Eclipse
bugs.eclipse.org › bugs › show_bug.cgi
144477 – "Indirectly referenced from required .class files" - Bugs
Download · Getting Started · Members · Projects · Community · Marketplace · Events · Planet Eclipse · Videos · Participate
🌐
CFD Online
cfd-online.com › Forums › star-ccm › 200108-cannot-resolved-type-error-eclipse.html
Cannot be resolved to a type error in eclipse -- CFD Online Discussion Forums
Hi, I am trying to write a macro with eclipse. my macro code has the following statements at the begining. Code: package macro; import java.util.*;
🌐
Experts Exchange
experts-exchange.com › questions › 29150992 › Cannot-resolve-type-problems-with-eclipse.html
Solved: Cannot resolve type problems with eclipse | Experts Exchange
July 3, 2019 - package com.example.demo; import java.util.List; import java.util.Objects; import java.util.Optional; import java.util.function.Consumer; import javax.management.Query;
🌐
Oracle
docs.oracle.com › javase › 8 › docs › api › java › util › function › IntSupplier.html
IntSupplier (Java Platform SE 8 )
March 16, 2026 - There is no requirement that a distinct result be returned each time the supplier is invoked. This is a functional interface whose functional method is getAsInt().
🌐
Javabrahman
javabrahman.com › java-8 › java-8-java-util-function-supplier-tutorial-with-examples
Java 8 java.util.function.Supplier Tutorial with Examples
December 16, 2015 - Function Descriptor of Supplier<T> Supplier's Function Descriptor is () -> T . This means that there is no input in the lambda definition and the return output is an object of type T. To understand Function Descriptors in details you can refer the function descriptor tutorialTutorial explaining ...