Biology Forums - Study Force

Science-Related Homework Help Computer Studies Topic started by: Yeeeee89 on May 5, 2020



Title: Suppose s is a string with the value "java". What will be assigned to x if you execute the ...
Post by: Yeeeee89 on May 5, 2020
Suppose s is a string with the value "java". What will be assigned to x if you execute the following code?

char x = s.charAt(4);


▸ 'v'

▸ 'a'

▸ Nothing will be assigned to x, because the execution causes the runtime error StringIndexOutofBoundsException.


Title: Suppose s is a string with the value "java". What will be assigned to x if you execute the ...
Post by: blazeypooh on May 5, 2020
Content hidden