Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7070765
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T05:36:21+00:00 2026-05-28T05:36:21+00:00

I have read http://cr.openjdk.java.net/~briangoetz/lambda/lambda-state-4.html and noticed that all the examples have argument type declared

  • 0

I have read http://cr.openjdk.java.net/~briangoetz/lambda/lambda-state-4.html and noticed that all the examples have argument type declared explicitly, even though it’s already known from the interface-function declaration.

public interface FileFilter {
    /** ... **/
    boolean accept(File pathname);
}


FileFilter java = (File f) -> f.getName().endsWith(".java");

Can’t we go with just

(f) -> f.getName().endsWith(".java"); ?

UPDATE: In the JSR-335 Draft, I have found that inferred-type parameters are most likely to be supported

(int x) -> x+1 // Single declared-type parameter
(int x) -> { return x+1; } // Single declared-type parameter
(x) -> x+1 // Single inferred-type parameter
x -> x+1 // Parens optional for single inferred-type case 
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-28T05:36:22+00:00Added an answer on May 28, 2026 at 5:36 am

    There’s an example where the type is omitted in the “4. Target typing” section

    Comparator<String> c = (s1, s2) -> s1.compareToIgnoreCase(s2);
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have read the examples here: http://framework.zend.com/manual/en/zend.gdata.spreadsheets.html But those examples assume the spreadsheet to
I have read http://www.ibm.com/developerworks/java/library/j-jtp05236/index.html I decide to make my lock uncancelable task by try
I have read the documentation ( http://dev.mysql.com/doc/refman/5.1/en/partitioning.html ), but I would like, in your
I have read (or perhaps heard from a colleague) that in .NET, TransactionScope can
I have read the following rails guide : http://guides.rails.info/active_record_querying.html in there exemple a client
So, here is the discussion I have just read: http://www.mail-archive.com/delphi@delphi.org.nz/msg02315.html BeginUpdate and EndUpdate is
I have read that 302 HTTP errors are not supposed to appear frequently even
I have just read about http://marc.info/?l=php-internals&m=131031747409271&w=2 . I use mysql_query in all my php
I have read http://developer.android.com/guide/practices/screens_support.html and http://developer.android.com/reference/android/util/DisplayMetrics.html and I somehow left with a gap here.
I have read the Apple docs - http://developer.apple.com/library/ios/#featuredarticles/ViewControllerPGforiPhoneOS/TabBarControllers/TabBarControllers.html#//apple_ref/doc/uid/TP40007457-CH102-SW1 about creating TabBar programmatically. I want

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.