public void getUnion(Node list1, Node list2) {

		if (list1 == null && list2 == null) {
			return;
		}

		System.out.println("List 1:");
		print(list1);

		System.out.println("List 2: ");
		print(list2);

		Node newList = new Node();

		while (list1 != null && list2 != null) {
			if (list1.getData() < list2.getData()) {
				add(newList, list1.getData());
				list1 = list1.getLink();
			} else if (list1.getData() > list2.getData()) {
				add(newList, list2.getData());
				list2 = list2.getLink();
			} else {
				add(newList, list2.getData());
				list1 = list1.getLink();
				list2 = list2.getLink();
			}
		}

		while (list1 != null) {
			add(newList, list1.getData());
			list1 = list1.getLink();
		}

		while (list2 != null) {
			add(newList, list2.getData());
			list2 = list2.getLink();
		}

		newList = newList.getLink();
		System.out.println("Union of lists:");
		print(newList);

	}