Suppose that s is the string computer What is the value of s

Suppose that s is the string \"computer\". What is the value of s.charAt(s.length()-1)?

Solution

Answer :


0 1 2 3 4 5 6 7 8


Total length of the string s = 8 , s.lenth()-1 = 8 -1 = 7 = R . Thus the value of s.char at (s.length()-1) = R

C O M P U T E R Null string
Suppose that s is the string \

Get Help Now

Submit a Take Down Notice

Tutor
Tutor: Dr Jack
Most rated tutor on our site