Main.java

mail@pastecode.io avatar
unknown
plain_text
3 years ago
468 B
2
Indexable
Never
import java.util.Scanner;

public class Main{

 public static void main(String[] args){

  Scanner scan = new Scanner(System.in);

  System.out.println("Enter array length:");

  int len = scan.nextInt();

  scan.nextLine();

  String[] wordList = new String[len];

  System.out.println("Enter values:");

  for(int i = 0; i < len; i++){

   wordList[i] = scan.nextLine();

  }

  System.out.println();

  active.reverse(wordList);

 }
}