java - trying to obtain a first name in the path after first back slash -


i want display first folder name path. /mnt/sdcard/videos/lk.jpeg, want display mnt string. in java

/mnt/sdcard/videos/lk.jpeg--> **mnt** 

string str = "/mnt/sdcard/videos/lk.jpeg"; system.out.println(str.split("/")[1]); 

try out. poor question. maybe asker can newbie.


Comments

Popular posts from this blog

commonjs - How to write a typescript definition file for a node module that exports a function? -

openid - Okta: Failed to get authorization code through API call -

ios - Change Storyboard View using Seague -