38 Java String-Related Techniques Making Your Life Easier

A collection of string related methods that help you achieve daily programming tasks with less time and effort.
2.0 (2 ratings) Instead of using a simple lifetime average, Udemy calculates a
course's star rating by considering a number of different factors
such as the number of ratings, the age of ratings, and the
likelihood of fraudulent ratings.
54 students enrolled
$19
$20
5% off
Take This Course
  • Lectures 43
  • Length 2 hours
  • Skill Level All Levels
  • Languages English
  • Includes Lifetime access
    30 day money back guarantee!
    Available on iOS and Android
    Certificate of Completion
Wishlisted Wishlist

How taking a course works

Discover

Find online courses made by experts from around the world.

Learn

Take your courses with you and learn anywhere, anytime.

Master

Learn and practice real-world skills and achieve your goals.

About This Course

Published 2/2015 English

Course Description

Working with strings is not as simple as it sounds. It can get from simple to very complex and frustrated, especially for inexperienced developers.

In this course, I want to exclusively focus on guiding different techniques that you might often encounter during daily programming tasks.

The course is a collection of more than 38 string related methods that support you in developing java applications with less painful and effort. No matter what kinds of applications you are building: desktop applications, web applications, or mobile applications, string manipulations are inevitable.

At the end of this course, you will be able to use different kinds of methods on proceeding string related requirements more easily and effectively with less overhead.

String manipulation is actually a wide topic. But after completing the course, I believe you should have solid and fundamental skills in processing strings and you can use those methods presented in the course to solve almost all common string related tasks.

What are the requirements?

  • Students who take this course should have basic levels in Java language
  • The course uses Netbeans 8 IDE running on JDK 8. These are freely downloaded
  • The course uses a third-party library: Apache Commons Lang. The library is freely downloaded

What am I going to get from this course?

  • Format a string with desired appearance
  • Format decimal numbers based on locale or with customized format
  • Format data times based on locale or with customized format
  • Manipulate strings with built-in Java APIs
  • Manipulate strings with Apache Commons Lang

What is the target audience?

  • Developers who want to master string manipulating skills
  • Developers who want to know different and flexible ways when working with strings
  • Developers who want to apply the Apache Commons Lang to save time and effort

What you get with this course?

Not for you? No problem.
30 day money back guarantee.

Forever yours.
Lifetime access.

Learn on the go.
Desktop, iOS and Android.

Get rewarded.
Certificate of completion.

Curriculum

Section 1: Formatting
06:20

You will learn different ways to format a string with custom characters as well as flags.

03:36

Different countries use different format to display numbers with decimal points and currencies. You will learn how to custom the format of those values

05:18

I will discuss more flexible ways to format decimal numbers and especially, with custom symbols.

04:28

You will learn how to display date time based on your desired locales

05:31

Besides formatting date times based locales, you will learn how to show your date times in any forms you would want

Section 2: String Manipulation With Java Built-in APIs
02:18

This lecture introduces how to break a string with substring() method and related one.

04:05

You will be introduced a more flexible way using the split() method. Some simple regular expressions will be discussed as well.

03:37

You will learn how to break a string with the Scanner class. You will also be shown using different input sources in the Scanner class.

02:00

Another sub-stringed technique is discussed: Stringtokenizer class. One of the string-related legacy classes that provides very good performance for splitting up a large string.

02:19

You will learn how to replace a sub string in a string using the 2 popular methods in the String class: replace() and replaceAll()

03:32

You will learn how to append strings to the original string using the 2 classes: StringBuffer and StringBuilder. You will also learn why we should use these 2 classes when appending a string. The differences between the 2 classes will be discussed as well.

Section 3: String Manipulation With Apache Commons Lang APIs
01:40

You will be instructed how to download the Apache Commons Lang library and add the library to your Java project.

03:00

You will learn how to shorten a string using the abbreviate() method. This is one of the most popular techniques that you should be aware of.

02:37

Capitalizing means that the first letter of a word is converted into the upper case letter. You will learn how to capitalize the first word or every word in a string.

00:52

Swapping case of a string means that upper case letters are converted to lower case letters and vice versa. In lecture will show a simple way to do that.

01:37

Sometimes, it is necessary to know the number of appearances of a sub string in a string. You will learn how to do that in this lecture.

02:07

Extracting initial letter of every word in a string is used quite often in many social networking sites so that users can have their representative abbreviation.

01:35

Working with text files sometimes leave unnecessary spaces in the source string. Normalizing spaces will remove those unused ones.

03:05

You will learn how to append a suffix to a string but only if the source string does not already end with the suffix.

02:35

You will learn how to add a prefix to the beginning of a string but only if the source does not already start with the prefix.

03:09

Very often when working with text and you need to surround strings with a certain character or sub string such as new line character, and html tags. This lecture will show you how easy it is to achieve such tasks.

03:53

One of the most common tasks when working with strings is to check the existence of a sub string or character in a source string. This lecture will show you several methods for such tasks.

02:49

2 special cases of checking for the existence of a sub string are to check if the source string starts or ends with a certain sub string.

02:18

You will learn to to easily extract sub strings from a string using 3 techniques: left, right, and middle

03:48

You will learn a special case of extracting sub strings from a string based on the types of characters.

02:40

You will learn how to add additional characters to the left or right of a string.

01:47

Sometimes, it is required to repeat a character or sub string with the number of specified times. You will learn how to do that in this lecture.

02:26

You will learn several methods that are very useful when removing a sub string in a string with practical examples.

02:43

You will learn many ways to remove spaces or specified characters in a string.

02:38

You will learn many methods for different random purposes: from creating random ASCII strings, letters, numbers only to alphabetical and numeric combination.

05:32

Very often when working with strings, you need to know the character types that the source string contains. Is it alphabetical? It is numeric? Does the input string contain only letters and digits? and so on.

03:10

If your task is to combine elements in an array into a string, then this lecture shows you how to do that. You can join elements from string array, integer array, float array, etc. You can join elements from a collection as well.

04:49

You will learn different ways to identify the index of a certain character or sub string in a string. These techniques are must-know skills when working with strings.

Section 4: Useful Constants
01:39

I will discuss the 2 constants that you can use to get the current file encoding and file separator.

01:54

Constants discussed in this lecture are used to get java related paths such as class paths, library paths, and IO temporary paths.

01:23

Constants that can be used to fetch user information such OS name, OS version, user country, language, and time zone.

01:06

Constants that are used to check the Operating System type the user is using.

01:12

Constants that can be used to check for Java platform that a user is using.

Section 5: Appendix
Source Code Project For Lectures In Section 1
Article
Source Code Project For Lectures In Section 2
Article
Source Code Project For Lectures In Section 3
Article
Source Code Project For Lectures in Section 4
Article
Section 6: Conclusion
Final words
01:10

Students Who Viewed This Course Also Viewed

  • Loading
  • Loading
  • Loading

Instructor Biography

Sera Nguyen, Developer, Architect, Professor

Hi, my is Sera Nguyen and I have a big interest in Software Programming. After completing my Computer Science degree, I was employed as Embedded Software Engineer at Renesas Corporation, then Software Architect at CSC Corporation. After more than 6 years in the Software Industry and completing my Master degree, I became a full time University Professor specializing in Software Engineering Faculty. Currently, I am still working full time as Professor and contracting trainer for software companies and doing research for my PhD degree in software architecture design field.

Ready to start learning?
Take This Course