CGI Java Interview Questions & Answers

Поділитися
Вставка
  • Опубліковано 9 лют 2025

КОМЕНТАРІ • 9

  • @AstronomyStartTrek2711
    @AstronomyStartTrek2711 2 роки тому +1

    Normal map we get concurrent modifiable exception when one iterator is iteratating and other iterator tries to update anything.Hence iterator of hash map is fail fast

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

      little correction "concurrent modification exception"

  • @pratapjavasingh3239
    @pratapjavasingh3239 3 роки тому +5

    Default size not 10 it's 16 and in a hashmap and when we insert as a Single null key then hashmap treats as first' indexed in 0 place

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

      correct

    • @2011ganga
      @2011ganga 3 роки тому

      And when default size filled with 75% , it will automatically increases size by 2X time. i.e will become 32

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

    Is this real interview?

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

    bro,, code at 10:00 ?

    • @JavaTechLead
      @JavaTechLead  3 роки тому +5

      package com.demo;
      import java.util.HashMap;
      public class Demo {
      public static void main(String[] args) {
      HashMap hm = new HashMap();
      hm.put("Raju", "Raju");
      hm.put("Kiran", "Kiran");
      hm.put("Suman", "Suman");
      hm.put("Ramu", "Ramu");
      hm.entrySet().stream().map(e->e.getValue()).sorted((e1,e2)->e1.compareTo(e2)).forEach(e->System.out.println(e));
      }
      }

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

    Horrific quality, but good content.