Write the code to retrieve the second last character from str="Data Analysis" in two different ways
Answers
Answered by
0
⠀
⠀
To extract last n characters, simply print (length-n)th character to nth character using the charAt() method.
⠀
⠀
▅▅▅▅▅▅▅▅▅▅▅▅▅▅▅▅
Similar questions