Which of the following would remove the first character and last character from the string and return the string between the first and last characters?
s[2:0]
s[1:0]
s[1:-1]
s[2:-2]


Answer :

Using the knowledge in computational language in JAVA it is possible to write a code that first character and last character from the string and return the string between.

Writting the code:

String str = "[wdsd34svdf]";

//String str1 = str.replace("[","").replace("]", "");

String str1 = str.replaceAll("[^a-zA-Z0-9]", "");

System.out.println(str1);

String strr = "[wdsd(340) svdf]";

String strr1 = str.replaceAll("[^a-zA-Z0-9]", "");

System.out.println(strr1);

s[1:-1]

See more about JAVA at  brainly.com/question/12975450

#SPJ1

View image LHMARIANATEIXEIRA