Get the Count of Words From a Capitalized String - Java Interview Question

แชร์
ฝัง
  • เผยแพร่เมื่อ 14 ต.ค. 2024

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

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

    Hi Naveen, this is the question asked my one of the company in UK

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

    Naveen, thanks! You do a great things, really like your channel. Your viewer from Russia 😘

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

    Your voice sounds different in this video. Might be a post covid effect. I am also covid Positive . I am recovering now. Hopefully it would pass soon.
    All the best Naveen ...and thanks for making such brilliant videos.

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

    Another way of doing this
    public static void main(String []args){
    String s="TH-camthisNaveeAutomatioLab";
    String replace = s.replaceAll("[^A-Z]","");
    System.out.println(replace.length());
    }

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

    Thanks Naveen for these useful Content ☺️ Please start a Series on API testing with rest assured 🙏 Which will be helpful for many of us ... Thanks in advance ☺️

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

    1 more interview question Naveen,
    How to debug the code if any test scrip failed in a smart way?

  • @SandeepKaur-rw8um
    @SandeepKaur-rw8um 3 ปีที่แล้ว +1

    Hi, just been through few of your videos today fortunately. very informational. What is the best way to connect with you if you provide online courses as well?
    I'm from Melbourne. Your response will be awaited.
    Thanks

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

    Pattern is new to me. Did you uploaded any video for pattern ??

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

    Videos are very helpful naveen.

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

    I have 5 years of experience in Testing area both Manual and Automation.Now I am looking for change and good package like 13-14LPA. Can You please suggest interview level and which skills should I have it

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

    Sir automation testing karne ke liye dev ops karna zaruri hai kya

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

    Interesting. Thank you very much.

  • @AbhishekSingh-bj8yc
    @AbhishekSingh-bj8yc 3 ปีที่แล้ว

    Thanks!!! Pattern one was quite new to me.

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

    Thank you brother

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

    This is to count capital character in string not a capitalize word in string.
    How to we validate word?
    If input is NAL then output is 3.
    If input is NaveenAutomationLab then also output is 3.

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

      NAL is not a word. Question is specific to capitalize string only. NaveenAutomationLab will give you 3 words as there are 3 words and each word starting with a capital letter. java cant validate the words by its own. In yur logic, you have to check once I get capital letter, it means there is a word up to the next caps letter.

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

      @@naveenautomationlabs thanks for explaining. Now I am clear

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

    Kudos sir 👏

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

    hello sir in this after checking for the first word id lower case or not and after that if i am applying the stream one to count it is not giving the expected result
    here's the code
    String str = "hiTarunSinghRawatIt'sMe";
    long count = 0;
    if (Character.isLowerCase(str.trim().charAt(0))) {
    count++;
    }
    for (int i = 0; i < str.length(); i++) {
    if (str.charAt(i) >= 'A' && str.charAt(i) Character.isUpperCase(e)).count();

    System.out.println(count);


    }
    }
    OUTPUT:
    6
    5
    please help i am not able to get why this is happening

  • @Ashokkumar-jb5pi
    @Ashokkumar-jb5pi 3 ปีที่แล้ว

    Hey Naveen the telegram link has expired .
    Can you please get us an active one ?

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

    Hi Naveen, pls explain this
    input=tomorrow
    Output=t$m$$rr$$$w

    • @Naveenkumar-wf2qo
      @Naveenkumar-wf2qo 3 ปีที่แล้ว +1

      String s2 ="tomorrow";
      String repl= s2.replace('o', '$');
      System.out.println(repl);

  • @RahulPandey-zl6oj
    @RahulPandey-zl6oj 3 ปีที่แล้ว +1

    How can i print all the words?

    • @SunnySingh-un7lw
      @SunnySingh-un7lw 3 ปีที่แล้ว

      public class StringHandling {
      public static void main(String[] args) {
      String str = "NaveenAutomationLabsTH-cam";
      int strLen = str.length();
      int count = 0;
      int startindex = 0;
      int endindex = 0;
      for (int i = 0; i < strLen - 1; i++) {
      if (Character.isUpperCase(str.charAt(i))) {
      count++;
      endindex = i;
      if (startindex != endindex) {
      System.out.println(str.substring(startindex, endindex));
      }
      startindex = endindex;
      }
      if (i == strLen-2) {
      System.out.println(str.substring(startindex));
      }
      }
      System.out.println("Total Number of Words are: " + count);
      }
      }

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

    Hey Naveen, the telegram link has expired. Can you please get us an active one?