Intro to Java Programming 8 - subString method

preview_player
Показать описание
In which we discuss one of the methods in the String class in java. We use the substring method to break down a phrase into 2 different parts.

If you have any questions leave a comment below or email me with the subject "java" or "java help".

Рекомендации по теме
Комментарии
Автор

This 8-year-old video helped a lot. Thx!

kevinliu
Автор

Hay man, this is really good. I didn't even know about that trick with .lenght() function. Thanks !

Labyrinthman
Автор

Thank you, mate! This really helped me out

bennet
Автор

thanks for your help....But i need more exercise in this method

plamedimandiangu
Автор

can we use substring with if else statement?Please answer

narminabdullayeva
Автор

So when you did the second println statement and did from (5, tutorial.length()) it still includes the last letter? I mean I know it shows the last one, but slightly confused since you said "It includes up to but not including" for the first. Does it just automatically if you do .length for the variable, include the last letter? Thanks

Anna-hnnr
Автор

Really helpful. Thanks for the tutorials.

kuii
Автор

I kinda get it but still get stuck, when using code academy javascript, it asks you to use a substring on "Jan" in January you start from zero so im assuming you stop on n so that would make it (0, 2) but the answer is (0, 3) how is that

strikerjess
Автор

i want to use this method to read the file data t i do not know how please help me thanks.

manalaouf
Автор

you know whats interesting? How this guy says variable. like vaarable

CptnTeaPot
Автор

How would you do this: Let's say I want to have a user input to a dialog box a filename. Ex: MyJavaProject.java. How do I get the output to be just what is after the dot?

menouthis
Автор

Hi, I am learning Java and i hope you can help with my doubt on how substring() method really works.The print statements below always print a space("") although i thought they would print a part of the original string.

Ex:String s1 ="Java";
System.out.println(s1.substring(1, 1); //was expecting 'a' but prints space
System.out.println(s1.substring(2, 2); //was expecting 'va' but prints space
System.out.println(s1.substring(3, 3); //don't know
System.out.println(s1.substring(4, 4);//don't know

mjshaheed
Автор

plz, i wanna how we can remove some letters from work
for example this word "NEW" and i wanna print "NW" without Letters"E"
how we can do this

basmaaboelezz
visit shbcf.ru