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
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
Yes indeed today is my birthday 🎉
WOOH Happy Birthday! :)
@@alexlorenlee thanks ♥️
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.
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! :)
Thank you so much for your videos! They are awesome and I would be really struggling without them
Yeaa
You're welcome!
I like the way you teach. Helps me learn quickly.❤️
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!
String a = "Nice vid Alex";
sysout(a);
ctrl spc
:1: error: class, interface, or enum expected
string a = " Nice vid Alex";
^
:2: error: class, interface, or enum expected
sysout(a);
^
2 errors
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 !
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);
}
What does StringBuilder do?
You are the best TH-camr! I always appreciate your video and again thank you for help to understand me.
Great video as always. Would be great if you could do a deeper lesson on file handling. You're the best teacher in java!
th-cam.com/video/xC4eH7LZdsE/w-d-xo.html link for java file handling exercise it may help you
Great work Alex
Please do the Algorithms and Data Structure Playlist
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!
your explanation is much better
Thank you. Finally I fount exactly what I was looking for.
Pls do more video about string methods, this is soo fun!!
This is the link for the string and its important methods: th-cam.com/video/G0ubR2mGFJE/w-d-xo.html
Your vidoes help me a lot.
Thank you, bro.Hope god bless you long life. blessings from my inner heart
Thanks Alex, your videos really make sense to me👌
Java Ninja...bro can u make atleast 2 3 videos per week..bcz ur explanation is superb
You help me a lot, you're a lot better than my prof'
you are the best God bless you😁😇
I dont think anyone would be watching your video on their birthday
Thank you Sir
Thanks sir! I need this to my system
How do you know it's my birthday today?
Thx!
Alex please make a video about serialization and deserialization
Mean while in python
s.capitalize()
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
perfect timing! 👌
Thank you so much!!!!!!!!!!
thank you so much
Just do -32 and cast to char
thanks a lot
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!
Just do as he did in the video with new the string and print out the new string
Great explanation 😇😇
It is my birthday. Now I am master of lowercaases.
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?
What are the chances im just now seeing this but it was posted on my birthday!
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
Please post a video about Bit Manipulation in java
Good vedio and it very and very helpful
Love your channel, thanks for the video!! Hope to see more exercises or even projects!!
Thank youuuu ☕☕☕☕
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? ;)
Good morning sensei.
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?
Can you make a video for picture input or make a serie where you make a desktop program
thankyou lad
Unfortunately I can’t use substrings for my itec class
amazing
☕☕☕☕
Please start using intelliJ with dark mode instead of the ancient eclipse
I think eclipse is beter.
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
Xup Alex ..how do you grow your TH-cam channel ? Do you use any tool?
How can I ignore the first index of a word?
Bro you look so done with life in this vid lol
For birthday we need capital B means
Please do a StdDraw tutorial
u de best bro
I want the first letter of the second word capitalize .. how to do it?
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
Hey Alex! Hope you're doing well! Can you please make a java chess game?
slm, how i can protect my application java against theft and decompiler java
but how do you capitalize both words???? I'm lost in trying to figure this out!
Do the same he did with the first word but just with the second word
how do i make the whole string into capital letters
. toUpperCase() ;
i love you
I am confused about the s.substring(0,1) and s.substring(1)
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
I love you
is the audible link working for anyone?
multithreading
Bro my eclipse IDE doesnt work antmore, something about error 2
is it due to update of java....
copy the code and make a new project and class and paste it in the class
👍
geez.. imagine doing more work just to add a capital letter
Type Sout.. And Press tab button... system.out.println();... 😅☕☕
why many people hate java?
DROP YOUR SKINCARE ROUTINE
aloe vera
icse 10 students
👇
BTW, PLS GIVE ME A SHOUT OUT PLS
SHOUT OUT
🤣