Beginner, need a little help
Hi, I'm new here and a beginner in java.
Can some one give me an example how to code a string that can performs:
1. make a string, and return 3 copies of the last two characters
For example: "Hi" will be "HiHiHi" or "Hello" will be "lololo"
2. make a string, and return first half
For example: "abcdef" will be "abcdef"
3. make a string, first and second string lose their initial letter and combine them.
For example : "Hi There" will be "ihere"
4. last but not least, make a string that yield 2 middle characters
For example : "String" will be "ri" or "Code" will be "od".
Really appreciate, if anyone can explains and help me, I've just start learning Java.