"Du vil ikke tro det. Jeg har lige afsluttet alle opgaverne for dig!"
"Sød! Tak, Diego."
"Men jeg har ikke tænkt mig at give dem til dig. Så du gør dem - det vil gøre dig klogere:"
24
Opgave
Java Multithreading, niveau, lektie
Låst
Threads of a string or stringy threads? That's the question
1. The getPartOfString method must return the substring between the first and the last tab characters.
2. The getPartOfString method should throw an exception if it receives invalid data:
a) StringForFirstThreadTooShortException if the thread's name is FIRST_THREAD_NAME.
24
Opgave
Java Multithreading, niveau, lektie
Låst
Find a substring
The getPartOfString method must return the substring that begins with the character after the first space and ends with the end of the word
that follows the 4th space.
Example: "CodeGym is the best place to learn Java."
Result: "is the best place"
Example: "Amigo and Diego are best friends!"
6
Opgave
Java Multithreading, niveau, lektie
Låst
Between tabs
The getPartOfString method must return the substring between the first and the second tab characters.
If the input data is invalid, throw a StringTooShortException.
Don't change the StringTooShortException class.
0
Kommentarer
Populær
Ny
Gammel
Du skal være logget ind for at skrive en kommentar