Question: private void nethod ( String [ ] array ) { for ( int i = 0 ; i array.length ? 2 ; i + +

private void nethod (String[] array){
for (int i=0;i array.length ?2;i++
String temp - array[i];
array[1]= array[array,length -i-1
}.
array[array, length - i -1]= temp;
j
If array has been defined with the following statement:
String[] array -{"a","b","c","d","e"t};
What would it be the value of the array after running the method?
ec","d","c","b","a"
"d":"e","a","b",,c"
"c","a","d","b","e"
 private void nethod (String[] array){ for (int i=0;i array.length ?2;i++ String

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!