Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- private void readData(String filename) {
- Scanner scanner = null;
- try {
- scanner = new Scanner(new File(filename));
- this.N = scanner.nextInt();
- this.K = scanner.nextLong();
- this.vector = new long[N];
- for(int i = 0; i < N; i++)
- this.vector[i] = scanner.nextInt();
- } catch (Exception e) {
- e.printStackTrace();
- } finally {
- try {
- if (scanner != null)
- scanner.close();
- } catch (Exception ex) {
- ex.printStackTrace();
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment