Capitalize The First Letter of a String in Java #30

แชร์
ฝัง
  • เผยแพร่เมื่อ 15 ก.ย. 2024
  • $1,000 OFF ANY Springboard Tech Bootcamps with my code ALEXLEE. See if you qualify for the JOB GUARANTEE! 👉 bit.ly/3HX970h
    We can capitalize the first letter of a string by using string methods. In this java tutorial, I show you how to use the substring and toUpperCase methods to create a new string with the first letter capitalized.
    I hope this helps you make your java program :) This is GREAT practice for getting your feet wet in java!
    I hope you enjoyed java program tutorial!
    Full Java Tutorial For Beginners Playlist: • Full Java Course by Al...
    Free Tips: bit.ly/3U6HXcb
    Disclosure: Springboard link provided is linked to my affiliate account & supports the channel.
    Alex Lee

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

  • @alexlorenlee
    @alexlorenlee  10 หลายเดือนก่อน +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

  • @PankajRai
    @PankajRai 4 ปีที่แล้ว +55

    Yes indeed today is my birthday 🎉

    • @alexlorenlee
      @alexlorenlee  4 ปีที่แล้ว +9

      WOOH Happy Birthday! :)

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

      @@alexlorenlee thanks ♥️

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

    Man you saved me from my task performance. I've been having a hard time lately so I couldn't focus at school. All your tutorials are very useful. Thank you.

  • @mr.sakowicz2888
    @mr.sakowicz2888 3 ปีที่แล้ว +2

    Amazing! I just watched ten or more videos trying to figure out how to do just this and finally, it all comes back - once again - to the great ALEX LEE! Cheers, bud! :)

  • @daives01
    @daives01 4 ปีที่แล้ว +12

    Thank you so much for your videos! They are awesome and I would be really struggling without them

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

    I like the way you teach. Helps me learn quickly.❤️

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

    Alex, I am looking forward to seeing videos of yours explaining more intermediate stuff in Java. Things like... layout managers? Maybe a series of videos on that matter. Stuff like modelling a project, with MVC, maybe? Hope you read this comment. Love your work!

  • @petarpetrovich2649
    @petarpetrovich2649 4 ปีที่แล้ว +17

    String a = "Nice vid Alex";
    sysout(a);

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

      ctrl spc

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

      :1: error: class, interface, or enum expected
      string a = " Nice vid Alex";
      ^
      :2: error: class, interface, or enum expected
      sysout(a);
      ^
      2 errors

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

    Hey Alex, thank you for your every video as they helped me alot in learning Java! I want u to share some stuff about Java Applets. Thanks alot !

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

    public static void main(String[] args) {
    //thanks Alex and this another solution using stringbuilder
    // happy coding
    StringBuilder name = new StringBuilder( "hussam");
    String firstLetter = name.substring(0,1).toUpperCase();
    System.out.println(firstLetter);
    name.deleteCharAt(0);
    name.insert(0,firstLetter);
    System.out.println(name);
    }

  • @jonghyunchoi1284
    @jonghyunchoi1284 4 ปีที่แล้ว

    You are the best TH-camr! I always appreciate your video and again thank you for help to understand me.

  • @chazk.official873
    @chazk.official873 4 ปีที่แล้ว +1

    Great video as always. Would be great if you could do a deeper lesson on file handling. You're the best teacher in java!

    • @sachiionlineacademy
      @sachiionlineacademy 4 ปีที่แล้ว

      th-cam.com/video/xC4eH7LZdsE/w-d-xo.html link for java file handling exercise it may help you

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

    Great work Alex

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

    Please do the Algorithms and Data Structure Playlist

  • @joethompson8147
    @joethompson8147 4 ปีที่แล้ว

    Great job here Alex! I have a gut feeling that String methods will be on the 2020 AP CS"A" somewhere so I looked for good videos and found this!

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

    your explanation is much better

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

    Thank you. Finally I fount exactly what I was looking for.

  • @hi-vk2sm
    @hi-vk2sm 4 ปีที่แล้ว +1

    Pls do more video about string methods, this is soo fun!!

    • @sachiionlineacademy
      @sachiionlineacademy 4 ปีที่แล้ว

      This is the link for the string and its important methods: th-cam.com/video/G0ubR2mGFJE/w-d-xo.html

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

    Your vidoes help me a lot.

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

    Thank you, bro.Hope god bless you long life. blessings from my inner heart

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

    Thanks Alex, your videos really make sense to me👌

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

    Java Ninja...bro can u make atleast 2 3 videos per week..bcz ur explanation is superb

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

    You help me a lot, you're a lot better than my prof'

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

    you are the best God bless you😁😇

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

    I dont think anyone would be watching your video on their birthday

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

    Thank you Sir

  • @patrickcodog8834
    @patrickcodog8834 4 ปีที่แล้ว

    Thanks sir! I need this to my system

  • @ДмитрийАницой
    @ДмитрийАницой 3 ปีที่แล้ว +2

    How do you know it's my birthday today?
    Thx!

  • @bokica4089
    @bokica4089 4 ปีที่แล้ว

    Alex please make a video about serialization and deserialization

  • @sareer
    @sareer 19 ชั่วโมงที่ผ่านมา +1

    Mean while in python
    s.capitalize()

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

    Mate you're a legend.....I need help I've got an assignment where I need to display my program on the internet, it's a payroll system and another program...... How or what's the code used in order to display it on the internet

  • @ideology8323
    @ideology8323 4 ปีที่แล้ว

    perfect timing! 👌

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

    Thank you so much!!!!!!!!!!

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

    thank you so much

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

    Just do -32 and cast to char

  • @sho2648
    @sho2648 7 หลายเดือนก่อน

    thanks a lot

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

    Using scanner. I am moving the first word of a string to the end and the second word in the string is now the new first word. I completed the program BUT! I do not know how to only capitalize the first letter of the new word. Please help!

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

      Just do as he did in the video with new the string and print out the new string

  • @vivekanand5900
    @vivekanand5900 4 ปีที่แล้ว

    Great explanation 😇😇

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

    It is my birthday. Now I am master of lowercaases.

  • @AmitYadav-nz5if
    @AmitYadav-nz5if ปีที่แล้ว

    Hey Alex! What to do if I want every first letter of the word in Capital? Lets's say there is "hello alex good morning" and i want "Hello Alex Good Morning" . What will be the program?

  • @jacobyealy9962
    @jacobyealy9962 4 ปีที่แล้ว

    What are the chances im just now seeing this but it was posted on my birthday!

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

    Hi @alex lee. How could I keep the same with a word that only has 1 letter? Mean that my input is :"this is a book" then return: "This Is a Book"
    Thanks you

  • @dhananjayand3057
    @dhananjayand3057 4 ปีที่แล้ว

    Please post a video about Bit Manipulation in java

  • @vinukumarvinu6220
    @vinukumarvinu6220 4 ปีที่แล้ว

    Good vedio and it very and very helpful

  • @ferfykins
    @ferfykins 4 ปีที่แล้ว

    Love your channel, thanks for the video!! Hope to see more exercises or even projects!!

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

    Thank youuuu ☕☕☕☕

  • @mr.sakowicz2888
    @mr.sakowicz2888 3 ปีที่แล้ว

    this is great- however now wondering how we could do this with user input- that would be an un-pre-defined string length- so I wonder if we could get the length and use that to run this string method? yikes my head hurts- help? ;)

  • @renecabuhan1675
    @renecabuhan1675 4 ปีที่แล้ว

    Good morning sensei.

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

    I need grab the last three characters and put them to lowercase and I do not know what I should be doing here. How would I go about using the substrings or code to make the last three characters of whatever my user inputs for a string, lowercase?

  • @tiboomvds344
    @tiboomvds344 4 ปีที่แล้ว

    Can you make a video for picture input or make a serie where you make a desktop program

  • @svensoelberg6730
    @svensoelberg6730 4 ปีที่แล้ว

    thankyou lad

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

    Unfortunately I can’t use substrings for my itec class

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

    amazing

  • @lumdermaku
    @lumdermaku 4 ปีที่แล้ว +5

    ☕☕☕☕
    Please start using intelliJ with dark mode instead of the ancient eclipse

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

      I think eclipse is beter.

    • @duckking7642
      @duckking7642 4 ปีที่แล้ว

      Eclipse looks good on mac, and it fits well for his tutorials in my opinion, but if you want to do java then yes I suggest IntellIJ IDEA but other than that, eclipse is good for other programming languages

  • @Sport-word
    @Sport-word 4 ปีที่แล้ว

    Xup Alex ..how do you grow your TH-cam channel ? Do you use any tool?

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

    How can I ignore the first index of a word?

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

    Bro you look so done with life in this vid lol

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

    For birthday we need capital B means

  • @liambrain7551
    @liambrain7551 4 ปีที่แล้ว

    Please do a StdDraw tutorial

  • @MuhammadAli-ci7qp
    @MuhammadAli-ci7qp 4 ปีที่แล้ว

    u de best bro

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

    I want the first letter of the second word capitalize .. how to do it?

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

      Do the same as he did in the video but reverse like add the First word then capitalize the first letter then add the rest of the word

  • @pranaykhimji9811
    @pranaykhimji9811 4 ปีที่แล้ว

    Hey Alex! Hope you're doing well! Can you please make a java chess game?

  • @EL.THIKA_Programmation
    @EL.THIKA_Programmation 4 ปีที่แล้ว

    slm, how i can protect my application java against theft and decompiler java

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

    but how do you capitalize both words???? I'm lost in trying to figure this out!

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

      Do the same he did with the first word but just with the second word

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

    how do i make the whole string into capital letters

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

      . toUpperCase() ;

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

    i love you

  • @janaldrinmanahan7330
    @janaldrinmanahan7330 4 ปีที่แล้ว

    I am confused about the s.substring(0,1) and s.substring(1)

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

      substring(0,1)
      Says go from index 0 - index 1 ex.
      hello
      it prints h
      the second one say go from Index 1 to the end of the string ex.
      Hello
      it prints ello

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

    I love you

  • @NAhiagbedey
    @NAhiagbedey 4 ปีที่แล้ว

    is the audible link working for anyone?

  • @shirshakupadhayay1315
    @shirshakupadhayay1315 4 ปีที่แล้ว

    multithreading

  • @kevinbeharrilal1609
    @kevinbeharrilal1609 4 ปีที่แล้ว

    Bro my eclipse IDE doesnt work antmore, something about error 2

    • @dannielpotter2259
      @dannielpotter2259 4 ปีที่แล้ว

      is it due to update of java....

    • @self-coder1621
      @self-coder1621 4 ปีที่แล้ว

      copy the code and make a new project and class and paste it in the class

  • @jeyhunaliyev1765
    @jeyhunaliyev1765 4 ปีที่แล้ว

    👍

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

    geez.. imagine doing more work just to add a capital letter

  • @manikandan-qh3oi
    @manikandan-qh3oi 2 ปีที่แล้ว

    Type Sout.. And Press tab button... system.out.println();... 😅☕☕

  • @eien7228
    @eien7228 4 ปีที่แล้ว

    why many people hate java?

  • @MrNotSelc
    @MrNotSelc 4 ปีที่แล้ว

    DROP YOUR SKINCARE ROUTINE

  • @study-st3th
    @study-st3th 6 หลายเดือนก่อน

    icse 10 students
    👇

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

    BTW, PLS GIVE ME A SHOUT OUT PLS