title
Java Video Tutorial 13

description
Code is Here: http://goo.gl/pp2RT Best Java Book : http://goo.gl/FtKp0m In this part of the Java Video Tutorial I cover most every method available for manipulating Strings and StringBuilders.

detail
{'title': 'Java Video Tutorial 13', 'heatmap': [{'end': 638.063, 'start': 608.161, 'weight': 1}], 'summary': 'The java video tutorial 13 covers the basics of strings and string builders, string creation, escape codes, string methods, including equality comparisons and manipulation, with a focus on preparing for more complex topics in the future, and it also discusses the benefits of using stringbuilder with a default capacity and the ability to increase size.', 'chapters': [{'end': 29.97, 'segs': [{'end': 29.97, 'src': 'embed', 'start': 0.069, 'weight': 0, 'content': [{'end': 3.472, 'text': 'Well hello internet and welcome to part 13 of my Java video tutorial series.', 'start': 0.069, 'duration': 3.403}, {'end': 7.956, 'text': "Today we're going to do the last of the simplistic things to learn about inside of Java.", 'start': 3.532, 'duration': 4.424}, {'end': 10.518, 'text': 'Everything after this is going to be a lot more complicated.', 'start': 7.996, 'duration': 2.522}, {'end': 12.74, 'text': "Today we're going to focus on strings and string builders.", 'start': 10.558, 'duration': 2.182}, {'end': 16.023, 'text': 'And I have just the basics laid out here that of course you understand.', 'start': 12.92, 'duration': 3.103}, {'end': 19.866, 'text': "And up here I'm importing my arrays library because I'm going to use that a little bit later on.", 'start': 16.183, 'duration': 3.683}, {'end': 21.086, 'text': "So let's just jump right into it.", 'start': 19.926, 'duration': 1.16}, {'end': 22.807, 'text': "And I'm going to start off very, very simple.", 'start': 21.106, 'duration': 1.701}, {'end': 26.729, 'text': "Some of the stuff you're already going to know, and then we're going to get into more complicated things as we go on.", 'start': 22.847, 'duration': 3.882}, {'end': 29.97, 'text': 'All the different methods available are all going to be presented here.', 'start': 26.769, 'duration': 3.201}], 'summary': 'Java tutorial focusing on strings and string builders, introducing basics and methods.', 'duration': 29.901, 'max_score': 0.069, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/RxeDe6BsTMI/pics/RxeDe6BsTMI69.jpg'}], 'start': 0.069, 'title': 'Java tutorial part 13: strings and string builders', 'summary': 'Covers the basics of strings and string builders in java, introducing simple concepts and methods, with a focus on preparing for more complex topics in the future.', 'chapters': [{'end': 29.97, 'start': 0.069, 'title': 'Java tutorial part 13: strings and string builders', 'summary': 'Covers the basics of strings and string builders in java, introducing simple concepts and methods, with a focus on preparing for more complex topics in the future.', 'duration': 29.901, 'highlights': ['The tutorial introduces the basics of strings and string builders, preparing for more complicated topics in Java.', 'The presenter starts with simple concepts and methods before delving into more complex aspects of strings and string builders.', 'The chapter includes a demonstration of importing the arrays library for later use in the tutorial.']}], 'duration': 29.901, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/RxeDe6BsTMI/pics/RxeDe6BsTMI69.jpg', 'highlights': ['The tutorial introduces the basics of strings and string builders, preparing for more complicated topics in Java.', 'The presenter starts with simple concepts and methods before delving into more complex aspects of strings and string builders.', 'The chapter includes a demonstration of importing the arrays library for later use in the tutorial.']}, {'end': 176.749, 'segs': [{'end': 61.124, 'src': 'embed', 'start': 30.09, 'weight': 0, 'content': [{'end': 32.211, 'text': 'So this is how you create a string.', 'start': 30.09, 'duration': 2.121}, {'end': 38.014, 'text': 'And make sure you surround all of your strings that you create with quotes and not apostrophes.', 'start': 32.47, 'duration': 5.544}, {'end': 38.734, 'text': 'Very important.', 'start': 38.114, 'duration': 0.62}, {'end': 42.075, 'text': 'Put apostrophes around characters and not strings.', 'start': 38.834, 'duration': 3.241}, {'end': 42.615, 'text': 'So there you are.', 'start': 42.095, 'duration': 0.52}, {'end': 43.476, 'text': 'I just created a string.', 'start': 42.635, 'duration': 0.841}, {'end': 44.356, 'text': 'Of course, you know that.', 'start': 43.516, 'duration': 0.84}, {'end': 46.317, 'text': 'And there, of course, is an apostrophe.', 'start': 44.436, 'duration': 1.881}, {'end': 49.298, 'text': "So let's go ahead and let's talk about escape codes.", 'start': 46.477, 'duration': 2.821}, {'end': 56.021, 'text': "So let's say you want to create another string and you have to use a quote inside of it for whatever reason.", 'start': 49.598, 'duration': 6.423}, {'end': 61.124, 'text': "So let's say you're going to put he said, which would be a good situation where you'd have to do that.", 'start': 56.161, 'duration': 4.963}], 'summary': 'Creating strings with quotes, not apostrophes. discussing escape codes.', 'duration': 31.034, 'max_score': 30.09, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/RxeDe6BsTMI/pics/RxeDe6BsTMI30090.jpg'}, {'end': 158.816, 'src': 'embed', 'start': 123.982, 'weight': 1, 'content': [{'end': 126.164, 'text': "And that's going to print out num2 just like that.", 'start': 123.982, 'duration': 2.182}, {'end': 127.965, 'text': 'So there you can use primitives.', 'start': 126.304, 'duration': 1.661}, {'end': 130.547, 'text': 'You can use anything inside of strings to print this stuff out.', 'start': 127.985, 'duration': 2.562}, {'end': 131.829, 'text': 'Really simple, simple stuff.', 'start': 130.608, 'duration': 1.221}, {'end': 137.43, 'text': 'Actually, in the first part of this video tutorial, I showed you how to convert primitive types.', 'start': 132.569, 'duration': 4.861}, {'end': 141.351, 'text': 'And those would be bytes, shorts, ints, longs, floats, doubles, and booleans.', 'start': 137.81, 'duration': 3.541}, {'end': 144.912, 'text': 'In combination with, first, byte.toString.', 'start': 141.551, 'duration': 3.361}, {'end': 148.093, 'text': "Depending upon the primitive, you're going to have to put a different type of thing in here.", 'start': 145.012, 'duration': 3.081}, {'end': 150.614, 'text': "So short, I'm going to convert a short to a string.", 'start': 148.173, 'duration': 2.441}, {'end': 152.374, 'text': 'You have to put short.toString.', 'start': 150.634, 'duration': 1.74}, {'end': 154.215, 'text': "And all the code's available underneath the video.", 'start': 152.454, 'duration': 1.761}, {'end': 157.776, 'text': "It'll really, really help you understand a little bit better if you go and download that.", 'start': 154.335, 'duration': 3.441}, {'end': 158.816, 'text': "Of course, it's all free.", 'start': 157.876, 'duration': 0.94}], 'summary': 'Tutorial on converting primitive types to strings, with code available for download.', 'duration': 34.834, 'max_score': 123.982, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/RxeDe6BsTMI/pics/RxeDe6BsTMI123982.jpg'}], 'start': 30.09, 'title': 'String creation and escape codes', 'summary': 'Explains string creation, escape codes, and printing techniques in java, including the use of primitives and conversion between string and primitive types, with various examples and tips for better understanding.', 'chapters': [{'end': 176.749, 'start': 30.09, 'title': 'String creation and escape codes', 'summary': 'Explains string creation, escape codes, and printing techniques in java, including the use of primitives and conversion between string and primitive types, with various examples and tips for better understanding.', 'duration': 146.659, 'highlights': ['The chapter explains string creation, escape codes, and printing techniques in Java The chapter covers the creation of strings in Java, the use of quotes and apostrophes, and the implementation of escape codes.', 'including the use of primitives and conversion between string and primitive types It discusses the utilization of primitives and the conversion between string and primitive types, such as byte, short, int, long, float, double, and boolean.', 'with various examples and tips for better understanding The chapter provides examples and tips for better comprehension, including the use of toString and parseInt to convert between string and primitive types, and offers downloadable code for further assistance.']}], 'duration': 146.659, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/RxeDe6BsTMI/pics/RxeDe6BsTMI30090.jpg', 'highlights': ['The chapter covers the creation of strings in Java, the use of quotes and apostrophes, and the implementation of escape codes.', 'It discusses the utilization of primitives and the conversion between string and primitive types, such as byte, short, int, long, float, double, and boolean.', 'The chapter provides examples and tips for better comprehension, including the use of toString and parseInt to convert between string and primitive types, and offers downloadable code for further assistance.']}, {'end': 510.938, 'segs': [{'end': 256.548, 'src': 'embed', 'start': 231.878, 'weight': 0, 'content': [{'end': 237.864, 'text': 'So these two things, as far as equals is concerned, are not equal because this is uppercase letters and this is lowercase letters.', 'start': 231.878, 'duration': 5.986}, {'end': 243.325, 'text': 'However, if you wanted to ignore case, you just change this to ignore case.', 'start': 238.024, 'duration': 5.301}, {'end': 244.386, 'text': 'Use a different method.', 'start': 243.625, 'duration': 0.761}, {'end': 246.826, 'text': 'And in this situation, they are going to print out.', 'start': 244.646, 'duration': 2.18}, {'end': 248.286, 'text': "As you see, they're equal.", 'start': 246.986, 'duration': 1.3}, {'end': 252.487, 'text': "So that's two different ways to do equality comparisons between strings.", 'start': 248.426, 'duration': 4.061}, {'end': 254.448, 'text': 'Create a couple more strings here.', 'start': 252.848, 'duration': 1.6}, {'end': 256.548, 'text': 'Alright, created two strings there.', 'start': 254.468, 'duration': 2.08}], 'summary': 'Demonstrated two methods for string equality comparisons.', 'duration': 24.67, 'max_score': 231.878, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/RxeDe6BsTMI/pics/RxeDe6BsTMI231878.jpg'}, {'end': 303.534, 'src': 'embed', 'start': 274.809, 'weight': 3, 'content': [{'end': 276.49, 'text': "So let's just print that guy out.", 'start': 274.809, 'duration': 1.681}, {'end': 281.373, 'text': 'So I can do something like second character, like that.', 'start': 276.73, 'duration': 4.643}, {'end': 290.647, 'text': 'And then, if I want to find out, based off of the letter string, what character is at a specific index position type in the CharacterAt method,', 'start': 281.553, 'duration': 9.094}, {'end': 292.608, 'text': 'and it will tell me exactly what that is.', 'start': 290.647, 'duration': 1.961}, {'end': 298.191, 'text': 'And you can get these characters and use them in other ways other than just printing them to the screen, and as you can see I printed that out.', 'start': 292.848, 'duration': 5.343}, {'end': 301.213, 'text': "There's numerous different ways to do pretty much everything inside of here.", 'start': 298.411, 'duration': 2.802}, {'end': 303.534, 'text': 'And you could also do a CompareTo.', 'start': 301.333, 'duration': 2.201}], 'summary': 'Demonstrates working with characters, indexes, and methods in programming.', 'duration': 28.725, 'max_score': 274.809, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/RxeDe6BsTMI/pics/RxeDe6BsTMI274809.jpg'}, {'end': 331.06, 'src': 'embed', 'start': 306.836, 'weight': 6, 'content': [{'end': 313.259, 'text': "CompareTo, that is another method for you, and let's compare it to more letters and see what happens.", 'start': 306.836, 'duration': 6.423}, {'end': 315.854, 'text': "And then I'll explain exactly what is going on here.", 'start': 313.479, 'duration': 2.375}, {'end': 317.755, 'text': 'It prints out a negative five.', 'start': 315.874, 'duration': 1.881}, {'end': 323.137, 'text': 'And the reason why is compareTo, if the strings are equal, is going to print out a zero.', 'start': 318.075, 'duration': 5.062}, {'end': 331.06, 'text': "If, however, when comparing these two strings, and they're comparing them based off of alphabetical order, okay, so that's what Java's doing here.", 'start': 323.377, 'duration': 7.683}], 'summary': 'The compareto method in java compares strings based on alphabetical order, printing negative numbers for inequality.', 'duration': 24.224, 'max_score': 306.836, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/RxeDe6BsTMI/pics/RxeDe6BsTMI306836.jpg'}, {'end': 389.405, 'src': 'embed', 'start': 361.483, 'weight': 4, 'content': [{'end': 363.685, 'text': 'That is how the compareTo function works.', 'start': 361.483, 'duration': 2.202}, {'end': 368.809, 'text': 'If you want to check whether a string contains certain things, no problem.', 'start': 363.985, 'duration': 4.824}, {'end': 371.772, 'text': 'Just type in letters and type in contains.', 'start': 368.849, 'duration': 2.923}, {'end': 375.375, 'text': "That's the way I wanted to find out if that string contained ABC.", 'start': 371.792, 'duration': 3.583}, {'end': 379.158, 'text': "Of course, we're going to be able to find that with that new awesome method.", 'start': 375.715, 'duration': 3.443}, {'end': 379.818, 'text': 'And there it is.', 'start': 379.258, 'duration': 0.56}, {'end': 382.421, 'text': 'True comes back, so you get a Boolean value.', 'start': 379.918, 'duration': 2.503}, {'end': 386.504, 'text': 'You could also check if letters ends with.', 'start': 382.681, 'duration': 3.823}, {'end': 388.505, 'text': 'a specific number of characters.', 'start': 386.804, 'duration': 1.701}, {'end': 389.405, 'text': 'Pretty simple.', 'start': 388.805, 'duration': 0.6}], 'summary': 'The compareto function can check if a string contains specified characters, returning a boolean value.', 'duration': 27.922, 'max_score': 361.483, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/RxeDe6BsTMI/pics/RxeDe6BsTMI361483.jpg'}, {'end': 510.938, 'src': 'embed', 'start': 476.405, 'weight': 2, 'content': [{'end': 479.127, 'text': "And I think you can guess that that's probably what it's going to do.", 'start': 476.405, 'duration': 2.722}, {'end': 481.469, 'text': 'So you type in letters, and you type in length.', 'start': 479.247, 'duration': 2.222}, {'end': 484.772, 'text': "And that's going to kick back the actual number of characters in the string.", 'start': 481.689, 'duration': 3.083}, {'end': 486.753, 'text': 'And you can see here, length is 5.', 'start': 484.952, 'duration': 1.801}, {'end': 487.634, 'text': "And that's exactly right.", 'start': 486.753, 'duration': 0.881}, {'end': 495.758, 'text': "Then also, if you wanted to replace certain different characters, like for instance, let's say you want to replace ABC with XY.", 'start': 487.734, 'duration': 8.024}, {'end': 497.979, 'text': "So it doesn't have to be the same number of characters here.", 'start': 495.958, 'duration': 2.021}, {'end': 500.48, 'text': "I'm replacing these three characters with these two characters.", 'start': 498.039, 'duration': 2.441}, {'end': 502.4, 'text': 'You would use the replace function to do that.', 'start': 500.64, 'duration': 1.76}, {'end': 504.541, 'text': "And as you can see, that's exactly what it did.", 'start': 502.661, 'duration': 1.88}, {'end': 508.143, 'text': 'It replaced the ABC with the two characters X and Y.', 'start': 504.581, 'duration': 3.562}, {'end': 510.297, 'text': 'And we can delete some of these things here.', 'start': 508.556, 'duration': 1.741}, {'end': 510.938, 'text': "We don't need them.", 'start': 510.337, 'duration': 0.601}], 'summary': 'Demonstrating string manipulation functions: length, replace.', 'duration': 34.533, 'max_score': 476.405, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/RxeDe6BsTMI/pics/RxeDe6BsTMI476405.jpg'}], 'start': 176.809, 'title': 'String methods in java', 'summary': "Discusses string equality comparisons using the methods equals and equalsignorecase, showcasing their case-sensitivity and case-insensitivity, and covers various string manipulation methods in java, including finding specific characters, comparing strings, checking string contents, finding index positions, and replacing characters. the length of the string 'letters' is 5.", 'chapters': [{'end': 252.487, 'start': 176.809, 'title': 'String equality comparisons', 'summary': "Discusses two methods, equals and equalsignorecase, to compare strings for equality, showcasing how the former is case-sensitive and the latter is case-insensitive, resulting in the former not being equal while the latter is equal for the given example strings 'big' and 'big'.", 'duration': 75.678, 'highlights': ["The equals method in Java is case-sensitive, leading to the strings 'uppercase' and 'lowercase' not being considered equal, while the equalsIgnoreCase method is case-insensitive, resulting in the strings being considered equal.", "The demonstration illustrates that using the equals method for comparing strings 'uppercase' and 'lowercase' results in them not being equal, whereas employing the equalsIgnoreCase method leads to them being considered equal."]}, {'end': 510.938, 'start': 252.848, 'title': 'String manipulation in java', 'summary': "Covers various string manipulation methods in java, including finding specific characters at index positions, comparing strings using compareto method, checking if a string contains certain characters, finding the starting index position for a certain number of characters, and replacing characters in a string. the length of the string 'letters' is 5.", 'duration': 258.09, 'highlights': ['Using the CharacterAt method, one can find out what character is at a specific index position in a string, similar to arrays. CharacterAt method', 'The CompareTo method compares two strings based on alphabetical order, returning a negative number if the first string comes before the second and a positive number if it comes after. CompareTo method', "The contains method returns a Boolean value indicating whether a string contains certain characters, for example, checking if the string 'letters' contains 'ABC'. contains method", "The length method returns the number of characters in a string, for example, the length of the string 'letters' is 5. length method", "The replace method is used to replace specific characters or substrings within a string, for example, replacing 'ABC' with 'XY'. replace method"]}], 'duration': 334.129, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/RxeDe6BsTMI/pics/RxeDe6BsTMI176809.jpg', 'highlights': ["The demonstration illustrates that using the equals method for comparing strings 'uppercase' and 'lowercase' results in them not being equal, whereas employing the equalsIgnoreCase method leads to them being considered equal.", "The equals method in Java is case-sensitive, leading to the strings 'uppercase' and 'lowercase' not being considered equal, while the equalsIgnoreCase method is case-insensitive, resulting in the strings being considered equal.", "The length method returns the number of characters in a string, for example, the length of the string 'letters' is 5.", 'Using the CharacterAt method, one can find out what character is at a specific index position in a string, similar to arrays. CharacterAt method', "The contains method returns a Boolean value indicating whether a string contains certain characters, for example, checking if the string 'letters' contains 'ABC'. contains method", "The replace method is used to replace specific characters or substrings within a string, for example, replacing 'ABC' with 'XY'. replace method", 'The CompareTo method compares two strings based on alphabetical order, returning a negative number if the first string comes before the second and a positive number if it comes after. CompareTo method']}, {'end': 942.639, 'segs': [{'end': 559.757, 'src': 'embed', 'start': 528.53, 'weight': 0, 'content': [{'end': 532.073, 'text': "But what we're going to do here is you have to provide a delimiter is what it's called.", 'start': 528.53, 'duration': 3.543}, {'end': 534.815, 'text': "In this situation, I'm just going to put a delimiter as nothing.", 'start': 532.113, 'duration': 2.702}, {'end': 539.706, 'text': 'And that just means, how do you want to divide these characters up? That is all that means.', 'start': 535.083, 'duration': 4.623}, {'end': 542.908, 'text': "So in this situation, we don't have any space between these letters.", 'start': 539.806, 'duration': 3.102}, {'end': 546.13, 'text': "But let's say everything was divided by a comma.", 'start': 543.068, 'duration': 3.062}, {'end': 549.953, 'text': 'So you have a comma b comma c in this situation.', 'start': 546.19, 'duration': 3.763}, {'end': 554.615, 'text': 'Well, in that situation, the delimiter, if you wanted to divide all the characters up, would be a comma.', 'start': 550.073, 'duration': 4.542}, {'end': 559.757, 'text': "Then what it's going to do is it's going to put A, B, and C all in separate compartments inside of an array.", 'start': 554.655, 'duration': 5.102}], 'summary': 'Explaining the concept of delimiter and its application using examples.', 'duration': 31.227, 'max_score': 528.53, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/RxeDe6BsTMI/pics/RxeDe6BsTMI528530.jpg'}, {'end': 638.063, 'src': 'heatmap', 'start': 608.161, 'weight': 1, 'content': [{'end': 614.805, 'text': "let's create a character array and and do pretty much the same sort of thing, except we're going to go letters to care,", 'start': 608.161, 'duration': 6.644}, {'end': 619.009, 'text': "and now it's going to provide us more of what we're looking for, as you can see it printed out right there.", 'start': 614.805, 'duration': 4.204}, {'end': 622.651, 'text': 'so it just separated all the different characters and put them all in separate compartments.', 'start': 619.009, 'duration': 3.642}, {'end': 629.316, 'text': 'another neat thing you can do is actually get different parts of the string to print out to the screen using a substring function.', 'start': 622.651, 'duration': 6.665}, {'end': 635.021, 'text': "so we'll just go letters, dot, substring, and yes, in this situation, for some god awful reason,", 'start': 629.316, 'duration': 5.705}, {'end': 638.063, 'text': 'they decided to not go and put an uppercase inside of there.', 'start': 635.021, 'duration': 3.042}], 'summary': 'Demonstrates character array manipulation, including substring function usage and character separation.', 'duration': 29.902, 'max_score': 608.161, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/RxeDe6BsTMI/pics/RxeDe6BsTMI608161.jpg'}, {'end': 644.767, 'src': 'embed', 'start': 614.805, 'weight': 2, 'content': [{'end': 619.009, 'text': "and now it's going to provide us more of what we're looking for, as you can see it printed out right there.", 'start': 614.805, 'duration': 4.204}, {'end': 622.651, 'text': 'so it just separated all the different characters and put them all in separate compartments.', 'start': 619.009, 'duration': 3.642}, {'end': 629.316, 'text': 'another neat thing you can do is actually get different parts of the string to print out to the screen using a substring function.', 'start': 622.651, 'duration': 6.665}, {'end': 635.021, 'text': "so we'll just go letters, dot, substring, and yes, in this situation, for some god awful reason,", 'start': 629.316, 'duration': 5.705}, {'end': 638.063, 'text': 'they decided to not go and put an uppercase inside of there.', 'start': 635.021, 'duration': 3.042}, {'end': 644.767, 'text': "and let's say, you wanted to start at the second index, which in, as you know, is one, and you wanted to go through the fourth one.", 'start': 638.303, 'duration': 6.464}], 'summary': 'Demonstrates separating characters, using substring function to print specific parts of a string.', 'duration': 29.962, 'max_score': 614.805, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/RxeDe6BsTMI/pics/RxeDe6BsTMI614805.jpg'}, {'end': 724.198, 'src': 'embed', 'start': 670.195, 'weight': 1, 'content': [{'end': 672.237, 'text': "There's just a whole bunch of extra stuff there.", 'start': 670.195, 'duration': 2.042}, {'end': 675.541, 'text': "Now, if you wanted to get rid of this whitespace, it's real simple.", 'start': 672.257, 'duration': 3.284}, {'end': 679.469, 'text': "Let's just take RAM string and call the trim method on it.", 'start': 675.681, 'duration': 3.788}, {'end': 681.17, 'text': "And that's exactly what it's going to do.", 'start': 679.829, 'duration': 1.341}, {'end': 685.893, 'text': "It's going to delete all the white space at the beginning and the end, not inside of the string itself.", 'start': 681.21, 'duration': 4.683}, {'end': 689.716, 'text': "Now, whenever you're dealing with strings, I'm going to throw kind of a big word at you.", 'start': 686.153, 'duration': 3.563}, {'end': 692.377, 'text': 'A string is what is known as an immutable.', 'start': 689.896, 'duration': 2.481}, {'end': 700.183, 'text': "And what that means is every single time you change a string in any way, it doesn't delete the previous version of that string in memory.", 'start': 692.538, 'duration': 7.645}, {'end': 706.547, 'text': 'What it does is it creates a brand new location in memory for the string over and over and over and over again.', 'start': 700.283, 'duration': 6.264}, {'end': 713.652, 'text': "Now this is kind of time-consuming, so if you're planning on making a ton of different edits to a string,", 'start': 706.767, 'duration': 6.885}, {'end': 719.355, 'text': "you should use what's called a string builder, because a string builder basically gets a block of memory and it continues to use it,", 'start': 713.652, 'duration': 5.703}, {'end': 722.157, 'text': "and it doesn't recreate the string over and over, and over and over again.", 'start': 719.355, 'duration': 2.802}, {'end': 724.198, 'text': "But other than that, they're very, very similar.", 'start': 722.357, 'duration': 1.841}], 'summary': 'Use trim method to delete whitespace. string is immutable, consider using a string builder for multiple edits.', 'duration': 54.003, 'max_score': 670.195, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/RxeDe6BsTMI/pics/RxeDe6BsTMI670195.jpg'}, {'end': 767.485, 'src': 'embed', 'start': 739.538, 'weight': 3, 'content': [{'end': 745.405, 'text': "Okay, so if you want to, for example, append something to the end of a string builder, this is how you're going to do that.", 'start': 739.538, 'duration': 5.867}, {'end': 749.269, 'text': "I'm just going to type in rand sb, because that's the name of my string builder.", 'start': 745.425, 'duration': 3.844}, {'end': 751.172, 'text': 'and call the append.', 'start': 749.631, 'duration': 1.541}, {'end': 754.615, 'text': "Let's come in here, throw another string in, let's just type in again.", 'start': 751.392, 'duration': 3.223}, {'end': 757.677, 'text': 'And you can see that it prints out a random value again.', 'start': 754.895, 'duration': 2.782}, {'end': 760.92, 'text': 'It appends that extra information onto the screen.', 'start': 757.898, 'duration': 3.022}, {'end': 762.881, 'text': 'And just so you know this.', 'start': 761.28, 'duration': 1.601}, {'end': 767.485, 'text': 'that change that we just made right there is not just for that line of code.', 'start': 762.881, 'duration': 4.604}], 'summary': 'Appending to a string builder adds extra information, illustrating the dynamic nature of the process.', 'duration': 27.947, 'max_score': 739.538, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/RxeDe6BsTMI/pics/RxeDe6BsTMI739538.jpg'}, {'end': 806.601, 'src': 'embed', 'start': 776.59, 'weight': 6, 'content': [{'end': 782.236, 'text': "And if you wanted to delete certain information inside of here, well, you know there's a delete method.", 'start': 776.59, 'duration': 5.646}, {'end': 790.105, 'text': "And let's say we want to delete from 15 to, say, 21, which is, in essence, going to delete the again part that you just added with the append.", 'start': 782.576, 'duration': 7.529}, {'end': 791.146, 'text': 'And you can see it did that.', 'start': 790.225, 'duration': 0.921}, {'end': 798.893, 'text': 'Now remember before I said whenever you create a string builder what it in essence is doing is providing you a certain amount of space in memory.', 'start': 791.328, 'duration': 7.565}, {'end': 806.601, 'text': 'Well, if you want to find out how much space and that space constantly changes, based off of any changes you make to the string?', 'start': 799.174, 'duration': 7.427}], 'summary': 'Demonstration of using delete method in string builder to remove specific information within a range.', 'duration': 30.011, 'max_score': 776.59, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/RxeDe6BsTMI/pics/RxeDe6BsTMI776590.jpg'}, {'end': 847.583, 'src': 'embed', 'start': 808.723, 'weight': 5, 'content': [{'end': 813.508, 'text': 'The capacity function is going to tell you how much total space you have in memory,', 'start': 808.723, 'duration': 4.785}, {'end': 821.737, 'text': 'and it is allocating you currently 30 characters worth of space inside of your string, and if you wanted to increase that size,', 'start': 813.508, 'duration': 8.229}, {'end': 829.419, 'text': 'what you just do is type in again your string builder and then you type in ensure capacity And you say how many characters do you want?', 'start': 821.737, 'duration': 7.682}, {'end': 830.739, 'text': "And they're typed in 60..", 'start': 829.739, 'duration': 1}, {'end': 836.38, 'text': "So now if I call this capacity function again, it's going to print out 60 instead of what I've had before.", 'start': 830.739, 'duration': 5.641}, {'end': 838.001, 'text': "So let's just cut that out of there.", 'start': 836.4, 'duration': 1.601}, {'end': 841.662, 'text': 'And you can see it provided me with 62 characters worth of space.', 'start': 838.341, 'duration': 3.321}, {'end': 845.483, 'text': "What ensure capacity does is it guarantees it's going to be at least 60 in size.", 'start': 841.782, 'duration': 3.701}, {'end': 847.583, 'text': 'However, it could be bigger than that.', 'start': 845.843, 'duration': 1.74}], 'summary': 'The capacity function allocates 30 characters, increased to 60 using ensure capacity.', 'duration': 38.86, 'max_score': 808.723, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/RxeDe6BsTMI/pics/RxeDe6BsTMI808723.jpg'}, {'end': 930.158, 'src': 'embed', 'start': 884.106, 'weight': 8, 'content': [{'end': 894.514, 'text': "If you wanted to insert a certain string or anything, starting at a specific index, so let's say if after, I want to change the word a into another.", 'start': 884.106, 'duration': 10.408}, {'end': 900.119, 'text': "What I would do is I'd say I want to start at index one and I want to put on another after that.", 'start': 894.694, 'duration': 5.425}, {'end': 902.961, 'text': "That's exactly how I'd do that with the insert method.", 'start': 900.299, 'duration': 2.662}, {'end': 906.804, 'text': 'Another random value, as you can see, I just went and put it right inside of there, real easy.', 'start': 903.141, 'duration': 3.663}, {'end': 912.289, 'text': 'And if you wanted to create a string, old SB, just call the toString method.', 'start': 907.085, 'duration': 5.204}, {'end': 915.129, 'text': "And that's going to convert your StringBuilder into a String.", 'start': 912.728, 'duration': 2.401}, {'end': 922.814, 'text': 'And rather than repeat myself, StringBuilders also have a lot of the same functions as Strings, such as CharacterAt.', 'start': 915.37, 'duration': 7.444}, {'end': 926.016, 'text': 'It works exactly the same for a StringBuilder as it does for a String.', 'start': 923.014, 'duration': 3.002}, {'end': 930.158, 'text': 'And then IndexOf also works exactly the same.', 'start': 926.556, 'duration': 3.602}], 'summary': 'Using insert method to add string at specific index in stringbuilder.', 'duration': 46.052, 'max_score': 884.106, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/RxeDe6BsTMI/pics/RxeDe6BsTMI884106.jpg'}], 'start': 511.178, 'title': 'String manipulation and stringbuilder in java', 'summary': 'Covers string manipulation in java, including splitting a string, using substring, and trimming whitespaces. it also explains string immutability, memory implications, and the benefits of using stringbuilder. additionally, it discusses stringbuilder functions, methods, default capacity, and the ability to increase size.', 'chapters': [{'end': 685.893, 'start': 511.178, 'title': 'String manipulation in java', 'summary': 'Covers string manipulation in java, including splitting a string into an array, using substring to extract parts of a string, and removing whitespace with the trim method.', 'duration': 174.715, 'highlights': ['The split method in Java can be used to divide a string into an array based on a delimiter, allowing for various manipulations. (e.g. letters.split() with a delimiter as nothing)', "The substring function in Java can be utilized to extract specific parts of a string, with options to convert the case of the extracted substring. (e.g. letters.substring(1, 4) to extract and display 'bcd')", 'The trim method in Java can remove leading and trailing whitespace from a string. (e.g. ramString.trim() to eliminate whitespace)']}, {'end': 791.146, 'start': 686.153, 'title': 'String mutation and stringbuilder', 'summary': 'Explains the concept of string immutability, the memory implications of string manipulation, and the benefits of using a stringbuilder to avoid unnecessary memory allocation and improve performance when making multiple string modifications.', 'duration': 104.993, 'highlights': ['A string is immutable, creating a new location in memory for every change, which can be time-consuming.', 'Using a StringBuilder can optimize memory usage by reusing the memory block and avoiding recreation of the string.', 'The append method of StringBuilder allows adding information to the string, making permanent changes to the StringBuilder.', 'The delete method of StringBuilder enables the removal of specific information from the string.']}, {'end': 942.639, 'start': 791.328, 'title': 'Stringbuilder functions and methods', 'summary': 'Discusses the capacity, length, ensure capacity, trimtosize, insert, and tostring functions of stringbuilder, highlighting the allocation of 30 characters by default, the ability to increase the size to 60 characters, and the similarity of certain methods to those of regular strings.', 'duration': 151.311, 'highlights': ['The capacity function allocates 30 characters by default, with the ability to increase it to 60 characters using ensure capacity.', 'The trimToSize function ensures that the capacity is equal to the length, demonstrated by the transformation of capacity from 62 to 15 after usage.', 'The insert method allows for the insertion of a string at a specific index, demonstrated by replacing a word with another at index one.', 'The toString method converts the StringBuilder into a String, providing a way to create a string from the StringBuilder object.', 'The StringBuilder shares several similar functions with Strings, including CharacterAt, IndexOf, LastIndexOf, and SubString.']}], 'duration': 431.461, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/RxeDe6BsTMI/pics/RxeDe6BsTMI511178.jpg', 'highlights': ['The split method in Java can be used to divide a string into an array based on a delimiter, allowing for various manipulations. (e.g. letters.split() with a delimiter as nothing)', 'Using a StringBuilder can optimize memory usage by reusing the memory block and avoiding recreation of the string.', "The substring function in Java can be utilized to extract specific parts of a string, with options to convert the case of the extracted substring. (e.g. letters.substring(1, 4) to extract and display 'bcd')", 'The append method of StringBuilder allows adding information to the string, making permanent changes to the StringBuilder.', 'The trim method in Java can remove leading and trailing whitespace from a string. (e.g. ramString.trim() to eliminate whitespace)', 'The capacity function allocates 30 characters by default, with the ability to increase it to 60 characters using ensure capacity.', 'The delete method of StringBuilder enables the removal of specific information from the string.', 'The trimToSize function ensures that the capacity is equal to the length, demonstrated by the transformation of capacity from 62 to 15 after usage.', 'The insert method allows for the insertion of a string at a specific index, demonstrated by replacing a word with another at index one.', 'The toString method converts the StringBuilder into a String, providing a way to create a string from the StringBuilder object.', 'The StringBuilder shares several similar functions with Strings, including CharacterAt, IndexOf, LastIndexOf, and SubString.', 'A string is immutable, creating a new location in memory for every change, which can be time-consuming.']}], 'highlights': ['The split method in Java can be used to divide a string into an array based on a delimiter, allowing for various manipulations. (e.g. letters.split() with a delimiter as nothing)', "The demonstration illustrates that using the equals method for comparing strings 'uppercase' and 'lowercase' results in them not being equal, whereas employing the equalsIgnoreCase method leads to them being considered equal.", 'The chapter covers the creation of strings in Java, the use of quotes and apostrophes, and the implementation of escape codes.', 'The presenter starts with simple concepts and methods before delving into more complex aspects of strings and string builders.', 'The tutorial introduces the basics of strings and string builders, preparing for more complicated topics in Java.', 'Using a StringBuilder can optimize memory usage by reusing the memory block and avoiding recreation of the string.', 'The chapter includes a demonstration of importing the arrays library for later use in the tutorial.', 'The append method of StringBuilder allows adding information to the string, making permanent changes to the StringBuilder.', "The substring function in Java can be utilized to extract specific parts of a string, with options to convert the case of the extracted substring. (e.g. letters.substring(1, 4) to extract and display 'bcd')", "The length method returns the number of characters in a string, for example, the length of the string 'letters' is 5.", 'The capacity function allocates 30 characters by default, with the ability to increase it to 60 characters using ensure capacity.', 'The trim method in Java can remove leading and trailing whitespace from a string. (e.g. ramString.trim() to eliminate whitespace)', 'The delete method of StringBuilder enables the removal of specific information from the string.', 'The trimToSize function ensures that the capacity is equal to the length, demonstrated by the transformation of capacity from 62 to 15 after usage.', 'The insert method allows for the insertion of a string at a specific index, demonstrated by replacing a word with another at index one.', 'The toString method converts the StringBuilder into a String, providing a way to create a string from the StringBuilder object.', 'The StringBuilder shares several similar functions with Strings, including CharacterAt, IndexOf, LastIndexOf, and SubString.', 'The CompareTo method compares two strings based on alphabetical order, returning a negative number if the first string comes before the second and a positive number if it comes after.']}