String#substring and jshell #airhacks #java #short

preview_player
Показать описание

Рекомендации по теме
Комментарии
Автор

Thanks for usual bash prompt with greater sing after directory name

ansarozden
Автор

so index.of returns us the index or position at which the chat is and substring returns us the block of chars till that specified index, right

mihirsawant
Автор

what if there are more than two dots in the file? The extension is only what goes after the last dot. Can be fixed by just changing indexOf to lastIndexOf.

nklymok