Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import java.util.*;
- import java.lang.*;
- import java.io.*;
- class Nodes {
- public int[] config;
- public int depth;
- public char dir;
- public int cost;
- public Nodes (int[] config, int depth, char dir, int cost){
- this.config=config;
- this.depth=depth;
- this.dir=dir;
- this.cost=cost;
- }
- }
- public class Test {
- public static void main(String[] args) {
- int[] array = {1,2,3,4,5,6,7};
- List<Nodes> list = new LinkedList<Nodes>();
- Nodes n1 = new Nodes(array,72,'D',32);
- list.add(n1);
- for (Nodes n:list) {
- System.out.println(Arrays.toString(n.config));
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement