javondailey6251 javondailey6251
  • 06-12-2022
  • Computers and Technology
contestada

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]

Respuesta :

lhmarianateixeira
lhmarianateixeira lhmarianateixeira
  • 12-12-2022

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

Ver imagen lhmarianateixeira
Answer Link

Otras preguntas

Evaluate functions w(n)=n^2-3n; find w(6) h(n)=2n; find h(5) h(x)=x^2+4x; find h(-7)
how can i tell on a position-time graph if it is speed or acceleration
Explain why the microscope changed the course of scientific research.
what is the answer to 14-8=2+
A peregrine falcon can fly 322 kilometers per hour. How many meters per hour can the falcon fly
What is the value of 4a3 – 2b2 + 5 when a = 3 and b = −2? Which is equal to 33 • 35?   A. 3^−2
Jacob  earned $80 babysitting and deposited the money into the his savings account.  The next week he spent $85 on video games.  Use integers to describe the we
What's 14.08. Written as a mixed number #plz✌️
explain why the types of technology valued can vary.
A peregrine falcon can fly 322 kilometers per hour. How many meters per hour can the falcon fly