Answered step by step
Verified Expert Solution
Link Copied!

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

image text in transcribed

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

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Design For Mere Mortals

Authors: Michael J Hernandez

4th Edition

978-0136788041

More Books

Students also viewed these Databases questions

Question

What is the difference between Needs and GAP Analyses?

Answered: 1 week ago

Question

What are ERP suites? Are HCMSs part of ERPs?

Answered: 1 week ago