Skip to content

Instantly share code, notes, and snippets.

@manoj2411
Last active November 9, 2020 04:09
Show Gist options
  • Save manoj2411/0102ba42dc75ba2f14ccca3ad5ee605f to your computer and use it in GitHub Desktop.
Save manoj2411/0102ba42dc75ba2f14ccca3ad5ee605f to your computer and use it in GitHub Desktop.
Java driver code for array for Geekforgeek practice
import java.util.*;
import java.lang.*;
import java.io.*;
class GFG {
public static void main (String[] args) throws Exception {
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
int tests = Integer.valueOf(br.readLine());
for (int t = 0; t < tests; t++) {
int n = Integer.valueOf(br.readLine());
String[] list = br.readLine().trim().split("\\s+");
int[] arr = new int[n];
for (int i = 0; i < arr.length; i++) {
arr[i] = Integer.valueOf(list[i]);
}
// call method from here
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment