About Question enthuware.ocpjp.v8.2.1871 :

Help and support on OCA OCP Java Programmer Certification Questions
1Z0-808, 1Z0-809, 1Z0-815, 1Z0-816, 1Z0-817

Moderator: admin

pavvel
Posts: 10
Joined: Fri Dec 15, 2023 4:00 pm
Contact:

Re: About Question enthuware.ocpjp.v8.2.1871 :

Post by pavvel »

I understood why the third option works - process(fnames, TestClass::size);
Due to the example below:

Code: Select all

class Main {
    public static void main(String[] args) {
        I i1 = A::m;
    }
    @FunctionalInterface
    interface I{
        void method();
    }
    class A {
        public static void m() {}
    }
}
Last edited by admin on Thu Apr 18, 2024 8:40 am, edited 1 time in total.
Reason: Please put code inside [code] [/code]

Post Reply

Who is online

Users browsing this forum: Bing [Bot] and 18 guests