Question: HELP IN JAVA PLEASE 1. Given a string str, extract its substring that is str where the first 2 and last 3 characters have been

HELP IN JAVA PLEASE

HELP IN JAVA PLEASE 1. Given a string str, extract its substring

1. Given a string str, extract its substring that is str where the first 2 and last 3 characters have been removed. Note: you can assume that str has at least 5 characters. 2. Extract from string str the substring made of str's last 4 characters. Note: you can assume that str has at least 4 characters. Bonus: write the shortest line of code that achieves this task and get 1 extra point. 3. Given a string str, insert a character '*' as str's second character and second to last. Note: you can assume that str has at least 3 characters. For instance: if str is "abcd", you want to produce "a*bc*d". Now you are asked what happens in the following scenarios: 4. What do the following lines of code output? int[] A = {2,0,2,1,0,3,0,4}; System.out.print(A); 5. What does the following lines of code produce/output? int[][] grades = {{90,79},{105,98},{97,95,99},{102,96,75,100}}; grades[grades.length-2] = grades[0]

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!