From the course: Nail Your Java Interview

Unlock the full course today

Join today to access over 22,400 courses taught by industry experts or purchase this course individually.

Apply string functions in technical interviews

Apply string functions in technical interviews - Java Tutorial

From the course: Nail Your Java Interview

Start my 1-month free trial

Apply string functions in technical interviews

- [Instructor] Sometimes, you may need to use more advanced string functions to process more complex string data. In this lesson, we'll be manipulating and parsing a string of text. For this given text below, we'll want to find out a few things. How many sentences does it have? How many words, how many characters? There are lots of questions we can ask about this piece of text, along with the various ways to manipulate it. Starting with the first question, let's try to figure out how many sentences this text has. This specific piece of text separates each sentence with a period and a space. If you are given this in an interview you might want to ask a clarifying question like should we expect sentences with question marks or exclamation points, ensuring you have a good definition of what a sentence is will be important for the implementation. In this case, let's say a sentence is defined by a piece of text with a…

Contents