课程: Java Algorithms
今天就学习课程吧!
今天就开通帐号,24,700 门业界名师课程任您挑!
Leverage built-in tools to generate custom data
- [Instructor] Reversing a string is a pretty common operation in programming and there are several ways to do it in Java. With the previous algorithm, we did it with a more bare bones approach where we iterated through each character and built our new string one character at a time. Another way we can reverse the string is by converting our data into a data type that has a built-in reverse method. In fact, the string builder class has a built-in reverse function. Let's create a string builder with the input string. To reverse the string, we can use the reverse function. This reverses the string. Now we can convert the string builder back into a string and return it from the function. When starting your software development journey, sometimes it can feel like you're cheating by using the functions built into the language or into the standard library. This is not cheating. Software engineering is all about using the best tools for the job to create the most accurate output through the…
随堂练习,边学边练
下载课堂讲义。学练结合,紧跟进度,轻松巩固知识。
内容
-
-
-
Validate Strings in Java: All-or-nothing properties4 分钟 17 秒
-
(已锁定)
Validate strings in Java: Specific properties2 分钟 58 秒
-
(已锁定)
Normalize strings in Java4 分钟 38 秒
-
(已锁定)
Basic parsing and searching strings in Java3 分钟 39 秒
-
(已锁定)
Apply custom parsing to search algorithms3 分钟 24 秒
-
(已锁定)
Create algorithm-driven strings in Java3 分钟 46 秒
-
(已锁定)
Leverage built-in tools to generate custom data2 分钟 30 秒
-
(已锁定)
Solution: Reverse each word3 分钟 32 秒
-
-
-
-
-
-
-