Answered step by step
Verified Expert Solution
Question
1 Approved Answer
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
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
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started