Cracking the coding interview || Java streams Coding questions

แชร์
ฝัง
  • เผยแพร่เมื่อ 5 ก.ย. 2024
  • cracking the coding interview made easy with the help of coding interview questions. This video contains must do coding questions, programming interview questions also subscribe us for daily coding problem.
    for source code visit: javatechiess.w...
    -----------------------------------------
    Subscribe to our channel : / javatechies
    Connect to us on WhatsApp: chat.whatsapp....
    Connect to us over Email : JavaTechiess@gmail.com
    Different companies interviews: • Java real time intervi...
    Top 10 Core java interview questions : • Top 10 Core java inter...
    Top 10 Collections interview questions : • Top 10 Java collection...
    Java Scheduler and Timer task : • Spring boot Scheduler ...
    Java program to find duplicate elements: • JAVA Program to find d...
    Java Program to find frequency of elements: • Java program to find F...
    Philips Java telephonic interview: • Philips Java Telephoni...
    Accenture java interview: • Philips Java Telephoni...
    HCL java interview : • Selected | java teleph...
    DELL java interview : • JAVA telephonic interv...
    Telstra Java interview: • Telstra real interview...
    UST global java interview : • UST Global real Interv...
    Ciena java interview : • UST Global real Interv...
    Altran java interview: • UST Global real Interv...
    L n T java Interview: • L&T java Interview rea...
    Wissen Technology java interview: • L&T java Interview rea...
    TCS Java Interview: • L&T java Interview rea...
    JP Morgan java interview: • JPMorgan Java Microser...
    VMWare java interview: • JPMorgan Java Microser...
    PayPal java interview: • Video
    Bottomline java interview: • Video
    Standard chartered Bank java interview: • Video
    Siemens java interview: • Video
    Mphasis java interview: • Video
    Altimetrik java interview: • Video
    M3BI java interview: • Video
    ITC Infotech java interview: • Video
    Oracle java interview: • Video
    VMWare java interview: • Video
    Unisys Java Interview: • Unisys Round 1 Java de...
    Top 10 Tricky core java Interview questions top java interview questions, top java interview questions and answers, top interview questions and answers, top java interview questions for freshers, top 10 java interview questions, tricky java interview questions, tricky java interview questions for experienced, tricky java questions, java tricky interview questions, top 50 java interview questions, top 50 core java interview questions, java interview questions by durga sir, java interview questions for experienced, java interview questions for freshers, java interview questions and answers, java interview questions and answers edureka
    #java​ #javaInterviewQuestions​ #JavaInterviewQuestionsandAnswers​​​ #Intellipaat​​​ #JavaInterview​​​ #CoreJavaInterviewQuestions​​​ #JavaInterviewQuestionsandAnswersForExperienced​​​ #JavaTutorial​​​ #JavaProgramming​​​ #JavaTutorialForBeginners​​​
    Thanks
    Java Techies

ความคิดเห็น • 118

  • @samsonrj5628
    @samsonrj5628 6 หลายเดือนก่อน +2

    This is very informative and useful. Thanks for the excellent streams questions and solutions.

    • @JavaTechies
      @JavaTechies  6 หลายเดือนก่อน +1

      Thank you so much for your feedback and support, it motivates me.

  • @vikrantharne9345
    @vikrantharne9345 3 ปีที่แล้ว +8

    one more question to add to list...
    que : get all employee having address (is of list type) start with P and having age greater than 22
    ans : employees.stream()
    .filter(employee -> employee.getAge()>22&&employee.getAddresses().stream()
    .anyMatch(adr -> adr.getCity().startsWith("p")))
    .forEach(System.out::println);

  • @MrSid2279
    @MrSid2279 3 ปีที่แล้ว +3

    Very nice exercise for practice on Streams. Excellent.

  • @abhilashpatel6852
    @abhilashpatel6852 ปีที่แล้ว +2

    On the spot. Best practical video on this topic so far. Will revisit again and again to refresh my memory.

    • @JavaTechies
      @JavaTechies  ปีที่แล้ว

      Thanks for your support

  • @sandeepikaenagaluru8462
    @sandeepikaenagaluru8462 3 ปีที่แล้ว +8

    Love you Manasi. You really helping others.

  • @ankitmishra9324
    @ankitmishra9324 3 ปีที่แล้ว +5

    Keep up the good work Mansi and Team , you guys are really helpful in cracking the interviews.

  • @vengateshm2122
    @vengateshm2122 3 ปีที่แล้ว +3

    Excellent. We'll organised.

  • @Krishnaentertainments7653
    @Krishnaentertainments7653 ปีที่แล้ว +1

    THANKS FOR YOUR VALUABLE INFORMATION ,IT HELP TO GET KNOWLEDGE

    • @JavaTechies
      @JavaTechies  ปีที่แล้ว

      Most welcome, we keep on sharing more valuable information in our whatsapp and telegram groups too.
      Feel free to join there of you want.

  • @apx1011
    @apx1011 3 ปีที่แล้ว +1

    Very very Helpful 👍 Thank you so much.
    Keep posting such real time scenarios of coding.

  • @vishnuprahladan4152
    @vishnuprahladan4152 3 ปีที่แล้ว +2

    It s really helpful. Thanks Java Techies Team.

  • @naveenbv1838
    @naveenbv1838 2 ปีที่แล้ว +2

    Thanks a lot for your effort and time you have invested to make us understand so clear in simple but effective examples. 🙏

  • @manuvashist3464
    @manuvashist3464 ปีที่แล้ว +1

    Really helpful questions to brush up

  • @sekhar14301
    @sekhar14301 11 หลายเดือนก่อน +1

    Thank you so much.. these examples are enough to crack the java8 for interview questions

    • @JavaTechies
      @JavaTechies  11 หลายเดือนก่อน

      Thank you

  • @rajumurugesan6927
    @rajumurugesan6927 2 ปีที่แล้ว +1

    Hi i really happy for this example.please prepare more programming interview questions

    • @JavaTechies
      @JavaTechies  2 ปีที่แล้ว

      Thank you so much, sure

  • @rushikeshgodase8498
    @rushikeshgodase8498 8 หลายเดือนก่อน +1

    Excellent Questions

    • @JavaTechies
      @JavaTechies  8 หลายเดือนก่อน

      Thank you

  • @venkatreddy525
    @venkatreddy525 2 ปีที่แล้ว +1

    This is a fantastic list of questions.

  • @ajeet382
    @ajeet382 9 หลายเดือนก่อน +1

    You nailed it mansi . very impressive set of questions . keep up the good work

    • @JavaTechies
      @JavaTechies  9 หลายเดือนก่อน

      Thank you so much, I really appreciate your feedback 🙏

  • @srikanthlaggeri9325
    @srikanthlaggeri9325 3 ปีที่แล้ว +3

    Thank you so much. This video gave more clarity on Streams. Can you please make a video on the Design patterns where it is implemented interview point of view .

  • @manishagarwal1505
    @manishagarwal1505 2 ปีที่แล้ว +2

    Good tutorial for java streams and lambda.
    Though I noticed that you used == for string comparison while we should use .equals something like "Male".equals(x.getGender())

  • @ashrafqureshi9333
    @ashrafqureshi9333 ปีที่แล้ว +1

    Thanks, Looking for such compilation of questions to practise stream. Really helpful 😄

  • @saivamsi4811
    @saivamsi4811 2 ปีที่แล้ว +1

    Thanks a ton for your hardwork and service...you are really helping a lot in cracking interviews..

  • @sreejak6776
    @sreejak6776 2 ปีที่แล้ว +1

    Thankyou so much for the informative questions

  • @WhiteObama112
    @WhiteObama112 ปีที่แล้ว +1

    for the question no 12 - I did some changes, here we need the list of names for each department which can be done with only stream like below.
    Map namesByDept = employeeList.stream().collect(

    Collectors.groupingBy(Employee::getDepartment)

    )
    .entrySet().stream()
    .collect(Collectors.toMap(o -> o.getKey(), o -> o.getValue()
    .stream()
    .map(m -> m.getName())
    .collect(Collectors.toList())
    ));

  • @AmitKumar-we8dm
    @AmitKumar-we8dm 8 หลายเดือนก่อน

    bahaut badhiya didi

    • @JavaTechies
      @JavaTechies  8 หลายเดือนก่อน

      Thank you

  • @dkvFitness
    @dkvFitness 3 ปีที่แล้ว +1

    Thanks Mansi for sharing your knowledge & Experience ❤️.

  • @imvickie1497
    @imvickie1497 3 ปีที่แล้ว +2

    Excellent

  • @rohitkumar-vk4fx
    @rohitkumar-vk4fx 3 ปีที่แล้ว +1

    You people are doing great work 👍👍

  • @mdmujahid8968
    @mdmujahid8968 ปีที่แล้ว +1

    Best stream api videoon TH-cam

  • @nchavva
    @nchavva 3 ปีที่แล้ว +1

    Superb

  • @flight_of_phoenix
    @flight_of_phoenix 2 ปีที่แล้ว +2

    I appreciate your hard work

  • @karanjain24
    @karanjain24 2 ปีที่แล้ว +2

    Absolutely loved the content, helped me a lot! Thanks 👍🏼

  • @basavarajnv1017
    @basavarajnv1017 3 ปีที่แล้ว +2

    Great work Manasi 👍thanks for the video ✌️

  • @pravinppatil2116
    @pravinppatil2116 3 ปีที่แล้ว +1

    Examples you have taken here are really helpful, Good Work keep it up.
    I want you to Correct 1-2 mistakez here while comparing string you have using == operation instead of that we should use equals method.

  • @jagadishgouda4496
    @jagadishgouda4496 2 ปีที่แล้ว +1

    Thanks a ton Mansi..Really appreciate you 👏🏻👏🏻

  • @dheerajjham3910
    @dheerajjham3910 ปีที่แล้ว +1

    Thanks a lot Java Techies..

  • @srinath710
    @srinath710 3 ปีที่แล้ว +2

    This what exactly iam looking for.

  • @Anilkumar-reddy
    @Anilkumar-reddy ปีที่แล้ว +1

    Thanks Mansi for your extreme efforts, keep it up. we need more videos from you. For the method 8 we can use like these right? Optional min = employeeList.stream().min(Comparator.comparing(Employee :: getYear));

  • @priyakoli5572
    @priyakoli5572 4 หลายเดือนก่อน +1

    Hi Ma'am, First of all Thank you very much for your efforts, its really helpful. wanted to ask one question: in method8 i am getting Optional.empty whereas if i remove either of condition then then o get some result, why so for me?

    • @JavaTechies
      @JavaTechies  4 หลายเดือนก่อน

      I did not get your question, join us on WhatsApp or telegram group, which is totally free, you can share your code and questions, either me or someone will be able to help you. thank you

  • @radharanganathan9610
    @radharanganathan9610 2 ปีที่แล้ว +2

    Vry useful examples
    Request u to increase the font size of programs

    • @JavaTechies
      @JavaTechies  2 ปีที่แล้ว

      Extremely sorry if that's not correctly visible, will take care next time

    • @radharanganathan9610
      @radharanganathan9610 2 ปีที่แล้ว

      @@JavaTechies tq

  • @start1learn-n171
    @start1learn-n171 2 ปีที่แล้ว +1

    TQ...that's helpful

  • @Ankitkumar-js3cj
    @Ankitkumar-js3cj 2 ปีที่แล้ว +1

    Great work . Thanks a lot.

  • @start1learn-n171
    @start1learn-n171 5 หลายเดือนก่อน +1

    Tq

    • @JavaTechies
      @JavaTechies  5 หลายเดือนก่อน

      You are welcome

  • @naveenvenkatesh3222
    @naveenvenkatesh3222 3 ปีที่แล้ว +2

    Keep up the good work 👏

  • @dellcruzo
    @dellcruzo 3 ปีที่แล้ว +2

    Awesome content 👍

  • @hopelesssouldisappointment5121
    @hopelesssouldisappointment5121 2 ปีที่แล้ว +1

    just awesome 👍

  • @pratikgaurav6631
    @pratikgaurav6631 3 ปีที่แล้ว +2

    Good one mansi and the backend team :)

  • @abhilashpatel6852
    @abhilashpatel6852 ปีที่แล้ว +1

    But how static method reference to Employee getter methods are working even if they are non-static method?

  • @sanchitthai4822
    @sanchitthai4822 2 ปีที่แล้ว +1

    This is awesome dude, why you stopped making, please make some more

    • @JavaTechies
      @JavaTechies  2 ปีที่แล้ว

      Thank you buddy, for sure we will add more. Working on something more awesome 😊

  • @thiyagarajan9410
    @thiyagarajan9410 3 ปีที่แล้ว +3

    If source code link was added in the description it would be better

  • @priyakoli5572
    @priyakoli5572 4 หลายเดือนก่อน +1

    Also for method4, what if we have 2 employees with same highest salary? then it displays only 1 person's salary....why so why not 2 if both have same highest salary?

    • @JavaTechies
      @JavaTechies  4 หลายเดือนก่อน

      Is it using findfirst ??

  • @neerajrajak6150
    @neerajrajak6150 3 ปีที่แล้ว +1

    Thanks you so much

  • @KiranKumar-ud6zz
    @KiranKumar-ud6zz 3 ปีที่แล้ว +3

    👏👏👏👏👍👍👍👍👍

  • @vamshikrishnagolla6506
    @vamshikrishnagolla6506 3 ปีที่แล้ว +1

    Tqs a lot !!

  • @brijeshverma7456
    @brijeshverma7456 2 ปีที่แล้ว +1

    Hi
    I have one question where i need to sort based on price. Can you please help
    Ques: Using Java8, sort the products in "Electronics" and "Accessories" by attribute "price" in desc order?
    public static void sortData() {
    List electronics = new ArrayList();
    Map map1 = new HashMap();
    map1.put("price", "100");
    map1.put("name", "Camera");
    Map map2 = new HashMap();
    map2.put("price", "200");
    map2.put("name", "Laptop");
    Map map3 = new HashMap();
    map3.put("price", "90");
    map3.put("name", "WebCam");
    electronics.add(map1);
    electronics.add(map2);
    electronics.add(map3);
    // Comparator.comparing() ->Integer.parseInt();
    List accessories = new ArrayList();
    Map amap1 = new HashMap();
    amap1.put("price", "50");
    amap1.put("name", "CameraBag");
    Map amap2 = new HashMap();
    amap2.put("price", "80");
    amap2.put("name", "LaptopBag");
    Map amap3 = new HashMap();
    amap3.put("price", "10");
    amap3.put("name", "MousePad");
    accessories.add(amap1);
    accessories.add(amap2);
    accessories.add(amap3);
    Map input = new HashMap();
    input.put("Electronics", electronics);
    input.put("Accessories", accessories);
    }

  • @kasivundavalli1883
    @kasivundavalli1883 3 ปีที่แล้ว +1

    method4. high salary name is giving only last list name always.. please correct it.

    • @joelgeorge1064
      @joelgeorge1064 3 ปีที่แล้ว

      could get the result by this way also employeeList.stream().max(Comparator.comparing(Employee::getSalary);

  • @asashish905
    @asashish905 2 ปีที่แล้ว +1

    Hi, most of your videos in the description are private. Unable watch. Can you help please?

    • @JavaTechies
      @JavaTechies  2 ปีที่แล้ว

      You can directly go to my channel and watch, all the visible ones will be public

  • @sangitamohanty7919
    @sangitamohanty7919 2 ปีที่แล้ว

    Hi , Need one help can u plz help how to get 2nd highest salary of each department

  • @simplyarranged
    @simplyarranged 2 ปีที่แล้ว +1

    Where is sir?🌹

  • @rahuljain-zw8vx
    @rahuljain-zw8vx ปีที่แล้ว +1

    cant get the source code, page not opening

  • @tanishkaggarwal2846
    @tanishkaggarwal2846 ปีที่แล้ว +1

    Can I get te code for pratice

  • @AHMADRAZAKHANjava
    @AHMADRAZAKHANjava 2 ปีที่แล้ว +1

    Pls provide the source code

  • @shankararvapally3333
    @shankararvapally3333 3 ปีที่แล้ว +1

    Can you please share github link?

    • @JavaTechies
      @JavaTechies  3 ปีที่แล้ว +1

      Posted on our website: javatechiess.wordpress.com/2021/06/02/cracking-the-coding-interview-java-streams-coding-questions/

    • @viswanathperada5956
      @viswanathperada5956 3 ปีที่แล้ว

      @@JavaTechies couldn't find the githib link in the site. Can you please add it under the video description section. Thanks in advance. Nice content extremely helpful. Awaiting for more concepts and videos.

  • @girish44444
    @girish44444 ปีที่แล้ว +1

    If there is more than 1 highest paid employee then it will give wrong result I think? For that :
    empList.stream()
    .collect(Collectors.groupingBy(Employee::getSalary, TreeMap::new, Collectors.toList()))
    .lastEntry() // for lowest salary you should use firstEntry;
    .getValue().forEach(entry -> System.out.println("Name : "+entry.getName() + " , "+ "Salary : "+ entry.getSalary()));