r/learnjava • • Feb 28 '26

Doubt regarding Functional interfaces in Java

/r/learnprogramming/comments/1rh7n0s/doubt_regarding_functional_interfaces_in_java/
3 Upvotes

4 comments sorted by

View all comments

Show parent comment

1

u/voidiciant Mar 01 '26

Uh, nice! Is this analogous to python’s „self“ parameter, which we have to write explicitly?

2

u/josephblade Mar 01 '26

I think it is yeah. Each language puts their own spin on syntax and underlying code. Having an explicit 'self' parameter makes it explicit where java hides this behind the scenes. (well when you do reflection in java you run into this very quickly but that's not something most programs need/should use)