Computer Applications

Write a statement each to perform the following task on a string:

Find and display the position of the last space in a string s.

Java String Handling

ICSE 2011

43 Likes

Answer


System.out.println(s.lastIndexOf(' '));

Answered By

30 Likes


Related Questions