Java 8 - Streams filter APIs Examples

Поділитися
Вставка
  • Опубліковано 18 лис 2024

КОМЕНТАРІ • 18

  • @parthapramanik5330
    @parthapramanik5330 2 роки тому +3

    I was wondering how to get started with Java Streams. And this video popped up in my watchlist. And, as always you have imparted your knowledge so effortlessly. Thanks a lot.

  • @vandanabanny7550
    @vandanabanny7550 2 роки тому +2

    one of the best video on Streams, I saw many videos none could explain as simple as you did. thanks for making this video. I am loving it :)

  • @ankitshrivastava1772
    @ankitshrivastava1772 11 місяців тому

    Also can create one predicate and use it
    List list = Arrays.asList("Phone","TV","Couch","Bike","Car");
    Predicate fun2 = x-> x!="Bike";
    List filterData = list.stream().filter(fun2).collect(Collectors.toList());

    System.out.println(filterData);

  • @VipinDahiya89
    @VipinDahiya89 Рік тому

    Thanks Naveen for awesome Knowledge sharing session.
    how can we sort the customer list according to age of customer Can you explain that in next video

  • @shobhit9826
    @shobhit9826 4 роки тому +1

    It's a rapid fire of knowledgeable videos coming in :)

  • @vijayaraghavanvashudevan1977
    @vijayaraghavanvashudevan1977 4 роки тому

    Thank you Naveen .. Soon expecting Interview Questions - Part 6 :)

  • @Swarno2004
    @Swarno2004 4 роки тому

    Is this map is not related with collection class map?
    Can we use hashmap or hashset with stream ?

    • @shankarpk89
      @shankarpk89 3 роки тому

      this map is different from maps that we use to deal with collections.
      Yes you can any collections as a matter of fact for a stream. A stream accepts, array, collections (lists, sets, queues) & even maps. In case of map the point is you cannot convert an entry (i.e. a key value together) to a stream but rather you can convert a key of a hashmap to a stream.

  • @gopalmukkamala
    @gopalmukkamala 4 роки тому

    Using stream can we check if the content exists in a web table clicking on pgination?

    • @shankarpk89
      @shankarpk89 3 роки тому

      I think you can. Streams have allMatch, anyMatch, noneMatch methods. These are terminal operations so you may use any of these to check for a specific content on a web table. All of these methods accept a predicate.

  • @Manashaist
    @Manashaist 2 роки тому

    Where exactly we will use this Stream api? Can you pls explain in real scenarios?

  • @gowrujaya3323
    @gowrujaya3323 2 роки тому

    Ur video, in my mobile SamsungGalaxyM57 not visible ...it's blur

  • @pratikkhodke9666
    @pratikkhodke9666 2 роки тому

    How we accept the data from the keyboard instead of hard-coded values

  • @arkaimps
    @arkaimps 4 роки тому

    Thanks Naveen.... Shared some great examples.
    I was wondering if anyone can help me in regards to below query:
    I was trying to create a Generic Method which will take List as one argument and String data_to_filter as another. The reason why I taking List as Generic so that I can use simple method with variance of different Model Class Objects for my different pages.
    But I am struggling to convert Predicate into Lambda Expression.
    @SuppressWarnings("unchecked")
    public static List filter_and_find_only_selected_Data1(List genericList, String dataFilter){
    Stream list = genericList.stream().map(eachListObj-> {
    if(eachListObj instanceof Employee){
    return genericList.stream().filter((Predicate

  • @swatiwhaval7053
    @swatiwhaval7053 4 роки тому

    what is the difference between filer and map?

    • @Aslam1610khan
      @Aslam1610khan 3 роки тому

      filter is if condition and map is assignment

  • @jatinsharma3792
    @jatinsharma3792 2 роки тому

    i am not yet comfortable with method referance will you please provide something so I understand things behind the screen. I don't want to follow the instruction I need to know deeply for better understanding and for the Intrest of learning.