subject

Write a static method, getbigwords, that gets a single string parameter and returns an array whose elements are the words in the parameter that contain more than 5 letters. (a word is defined as a contiguous sequence of letters.)example: so, if the string argument passed to the method was "there are 87,000,000 people in canada", getbigwords would return an array of two elements, "people" and "canada".another example: if the string argument passed to the method was "send the request to support@turingscraft. com", getbigwords would return an array of three elements, "request", "support" and "turingscraft".i have tried this question numerous times and have tried to apply solutions recomended on chegg, all of which are giving errors. i'm currently using this code; public static string[] getbigwords(string userstring){ string allwords[] = userstring. split("[@,\\s\\.\\? \\! ]"); string strings[] = new string[allwords. length]; int count = 0; for(int i = 0; i < allwords. length; i++){ if(allwords[i].length() > 5){ if(allwords[i].matches("a-za-z]+")) { strings[count] = allwords[i]; count++; } } } string result[] = new string[count]; for(int i = 0; i < count; i++) result[i] = strings[i]; return result; }when i submit the code into my programming lab, i get the following errors; more hints: ⇒ we think you might want to consider using: +=problems detected: ⇒ word 'extremely' not returned in result ⇒ word 'location' not returned in result ⇒ word 'powerful' not returned in result ⇒ word 'charge' not returned in result ⇒ word 'devoted' not returned in result ⇒ word 'elephants' not returned in result ⇒ word 'extremely' not returned in result ⇒ word 'location' not returned in result ⇒ word 'magnitude' not returned in result ⇒ word 'numeric' not returned in result ⇒ word 'personality' not returned in result ⇒ result array length (0) is wrongi've been trying to find a solution to this problem for hours and i'm completely stuck. what am i doing wrong?

ansver
Answers: 3

Other questions on the subject: Computers and Technology

image
Computers and Technology, 22.06.2019 07:30, DivineMemes420
What type of computer network ensures high security ?
Answers: 1
image
Computers and Technology, 23.06.2019 08:00, hernandez09297
What is a scenario where records stored in a computer frequently need to be checked
Answers: 2
image
Computers and Technology, 24.06.2019 06:30, hannahgracew12
Some peer-to-peer networks have a server and some don't. true false
Answers: 2
image
Computers and Technology, 24.06.2019 08:30, daskatingpanda
Formatting rows and columns is similar to cell formatting. in an openoffice calc spreadsheet, you can format data entered into rows and columns with the of the rows and columns options. you can insert rows and columns into, or delete rows and columns from, a spreadsheet. use the insert or delete rows and columns option on the insert tab. alternatively, select the row or column where you want new rows or columns to appear, right-click, and select insert only row or only column options. you can hide or show rows and columns in a spreadsheet. use the hide or show option on the format tab. for example, to hide a row, first select the row, then choose the insert tab, then select the row option, and then select hide. alternatively, you can select the row or columns, right-click, and select the hide or show option. you can adjust the height of rows and width of columns. select row and then select the height option on the format tab. similarly, select column, then select the width option on the format tab. alternatively, you can hold the mouse on the row and column divider, and drag the double arrow to the position. you can also use the autofit option on the table tab to resize rows and columns.
Answers: 1
You know the right answer?
Write a static method, getbigwords, that gets a single string parameter and returns an array whose e...

Questions in other subjects: