The world’s Largest Sharp Brain Virtual Experts Marketplace Just a click Away
Levels Tought:
Elementary,Middle School,High School,College,University,PHD
| Teaching Since: | Jul 2017 |
| Last Sign in: | 305 Weeks Ago |
| Questions Answered: | 15833 |
| Tutorials Posted: | 15827 |
MBA,PHD, Juris Doctor
Strayer,Devery,Harvard University
Mar-1995 - Mar-2002
Manager Planning
WalMart
Mar-2001 - Feb-2009
Array Exercises Create a class named Arrayfilercises that contains the following array tasks in the main method: 1. Write some code that asks the user to enter an integervia the keyboard, use that integer to set the
length of an array and populate it with random integers from -1? to 19 [inclusive]. Print the array
back in a nice way [10 numbers per line with commas and such]. 2. Below th- write some java to reverse the arrays:
charl] a = {"i:"J ‘o’y 'y’, ’cm"i ‘t’. 'a'}
charl] b = {'r’* 'a'* 'c‘, 'e', 'c’, ’a’, ’r'} You should do this by creating new arrays to store the reversal. Then write some mo re java code to
prove to me that array b contains a palindrome, while array a does not. 3. [Challengefl Write a method in your class called reverseArlay that is otvoid return type and it takes
as argument a String array [any String anay the teacher can think oil] and it reverses the given array
in place. That is, it manipulates the given array and modifies it [this is because arrays are passed in
to methods by reference and not byvalue...we will talk more about this in our next session.]
----------- ----------- H-----------ell-----------o S-----------ir/-----------Mad-----------am ----------- Th-----------ank----------- yo-----------u f-----------or -----------you-----------r i-----------nte-----------res-----------t a-----------nd -----------buy-----------ing----------- my----------- po-----------ste-----------d s-----------olu-----------tio-----------n. -----------Ple-----------ase----------- pi-----------ng -----------me -----------on -----------cha-----------t I----------- am----------- on-----------lin-----------e o-----------r i-----------nbo-----------x m-----------e a----------- me-----------ssa-----------ge -----------I w-----------ill----------- be----------- qu-----------ick-----------ly