Practice Java Program - Java Pangram Program #59

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

КОМЕНТАРІ • 22

  • @alexlorenlee
    @alexlorenlee  Рік тому +1

    If you’re new to programming but want a career in tech, I HIGHLY RECOMMEND applying to one of Springboard’s online coding bootcamps (use code ALEXLEE for $1,000 off): bit.ly/3HX970h

  • @rockagain5416
    @rockagain5416 5 років тому +1

    Sir good knowledge given thanks

  • @lordmzte724
    @lordmzte724 5 років тому +7

    wouldnt it be simple to use Character.toUpperCase() on every letter instead of having that condition?

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

    I have done this way:
    static void isPangram(String data){
    char[] str = data.replace(" ","").toUpperCase().toCharArray();
    int size = str.length;
    int[] newA = new int[26];
    int i=0;
    while (i!=size){
    int index = str[i]-65;
    newA[index] = 1;
    i++;
    }
    int j=0;
    while (j!=26){
    if(newA[j]==1){
    j++;
    }else{
    System.out.println("Non-Pangram..!");
    System.exit(0);
    }
    }
    System.out.println("Pangram String");
    }

  • @Mohanadxd
    @Mohanadxd 5 років тому

    Great work !!
    Did you make a video about printf if not can you please make one?
    Thank you

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

    If the first character is not a letter mark[0] would be marked true since index starts at 0 and we always mark even if it is not a letter.

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

    You can use Array.toString to view the array as a whole .

  • @Ravikumar-gj6qw
    @Ravikumar-gj6qw 4 роки тому

    Excellent bro

  • @Jawu523
    @Jawu523 7 місяців тому

    There’s a problem with your solution. It only find the character of your pangram to see if it’s within range. If you have 26 letter only consist of ‘z’ your pangram will still be true. Am I right ?

    • @純粹名字
      @純粹名字 7 місяців тому

      its not like that la, for example character 'C' - 'A' will result in 2, which will store in mark[2]. In ur case 26 of 'z' will result in only mark[25] is true la.

    • @Jawu523
      @Jawu523 7 місяців тому

      @@純粹名字that’s right. I misread the Boolean [] part

  • @Joe-km7xi
    @Joe-km7xi 5 років тому +2

    God damn these videos are helpful thank you keep them coming :)

  • @fergusscott9868
    @fergusscott9868 5 років тому +2

    I hate using Java so much but mate your videos are just absolutely exceptional, this is so fantastic for revisiting all the stuff I've forgotten/and am yet to learn!!!!

  • @fermingonzalez3842
    @fermingonzalez3842 5 років тому +1

    I got it now bro

  • @PremSharma-rv1qe
    @PremSharma-rv1qe 5 років тому

    Can u make a tutorial on arrays

  • @d-o-n-u-t
    @d-o-n-u-t 5 років тому +1

    Beep boop first

    • @n.rv..n
      @n.rv..n 4 роки тому

      *_sends blue shell_* oh, really???