11 to 12 Java Questions

As I mentioned in my previous post, my wife and I spent a week in Portugal. On the previous post I covered the days in Salema which is a town in the Algarve area. I will now comment on our stay in Lisbon.

Lisbon continues to grow. We stayed in an area named “Barrios Altos”. The area is hilly, the streets are paved with cobble stones so as the sidewalks some of which do not seem to allow two people side by side. On many streets you have parking on one side and the other is shared by trolleys, cars, buses and delivery trucks. We loved the area which contains a mixed of houses, buildings, businesses and restaurants. It seems like the concept of zoning did not take off in Lisbon. That said, my wife and I loved the city, its people and culture and will be returning for more in a few years.

Something that called my attention was the food and pastries. We shopped at several stores and pastry shops both in Lisbon and the Algarve. I did not notice a single sign for “no gluten”. In addition, did not see signs for organic products. Here in our country it seems that most products have a label and sign indicating they are organic and their price seems to be somewhat higher than products without such labels. We had sweets specially the “pasties de nata”. Perhaps they were sweeter than other pastries, but they all seemed to contain fewer sweeteners than comparable products here in the USA. A couple other products that called our attention were yogurts and ice cream. Both full of flavor with little sweeteners.

There is a place in Lisbon named “Time Out”. It is a renovated warehouse with dozens of kitchens associated with known chefs in the area. You order and pay, they give you a pager. 10 to 15 minutes later you pick up your food and eat it on common tables. While enjoying your purchase you have opportunities to talk with locals and mostly tourist from all over the world. One thing that I really enjoyed was an Angus beef burger on a brioche bun with lettuce and tomatoes. Among one of the best burgers I ever had.

One more things are the beers local beers. It seems like Sagres and Super Bock are the ones more consumed by locals. Both are Portuguese products. Not sure how many glasses I had during our stay, but if stop in Lisbon, go to the “Praca do Comercio” (a well know place on the shores of the Tagus River, and have beer and local cuisine in a restaurant named “The beer Museum”.

Enough of Lisbon, let’s get to the subject at hand which is going over the 50 plus questions regarding the Java language. On my first post, I tried to answer 10 questions at a time. I believe they were too many. In this post I will just address two (11 and 12). Will continue answering / covering all the questions in subsequent posts.

Q11. Can we override the private method in Java?

One cannot override private methods in Java. Private methods are non-virtual in Java and are accessed differently than non-private ones. Since method overriding can only be done on a derived class and private methods are not accessible in a subclass, one just cannot override them. No, because it’s not visible in the subclass, a primary requirement for overriding a method in Java.

Take a look at the following code:

/*
 * 
 */
public class PrivateMemberExample {

	private String	privateString = "I am a private string";
	
	/*
	 * 
	 */
	private void privateMethod() {
//	public void privateMethod() {
		System.out.println("privateMethod <<< private method of Outer class");
	}
	
	
	/*
	 * 
	 */
	class NestedClass extends PrivateMemberExample {
		
		/*
		 * 
		 */
		public void showPrivate() {
			System.out.println("showPrivate <<< privateString ==>" + privateString + "<==");
			privateMethod();
		}
		
		/*
		 * 
		 */
		private void privateMethod() {
//		public void privateMethod() {
			System.out.println("privateMethod <<< private method of Nested class");
		}
	}
	
	
	/*
	 * 
	 */
	public static void main(String[] args) {

		// **** ****
		PrivateMemberExample outerClass = new PrivateMemberExample();
		
		// **** ****
		NestedClass nestedClass = outerClass.new NestedClass();
		nestedClass.showPrivate();
		
		// **** ****
		outerClass = nestedClass;
		outerClass.privateMethod();
	}
}

If we run it as is we get the following output:

showPrivate <<< privateString ==>I am a private string<==
privateMethod <<< private method of Nested class
privateMethod <<< private method of Outer class

If we comment the private and uncomment the public declarations the output generated follows:

showPrivate <<< privateString ==>I am a private string<==
privateMethod <<< private method of Nested class
privateMethod <<< private method of Nested class

Q12. Difference between Hashtable and HashMap in Java?

You can check the definition of a Hashtable here. You can check out the definition of a HashMap here.

There are several differences, but the most important is that the Hashtable class is synchronized, while HashMap is not. The Hashtable is a legacy class and slightly slower when compared to the HashMap class.

Let’s first take a look the Java code that I wrote to experiment with both Hashtable and HashMap classes.

package canessa.hashmaptable;

import java.util.HashMap;
import java.util.Hashtable;
import java.util.concurrent.*;


public class solution {
	
	// **** ****
	final static int MAX_KEY	= 11;
	
	
	/*
	 * Hashtable is thread-safe
	 * Hashtable does not allow null key or values
	 * The thread-safety of the Hashtable is achieved using internal synchronization,
	 * which makes it slower than HashMap.
	 */
	static void hashTableImpl() {
		
		Hashtable<Integer, Integer> ht = new Hashtable<Integer, Integer>();

		// **** populate the Hashtable ****
		for (int i = 0; i < MAX_KEY; i++) {
			
			// ???? ????
			System.out.println("hashTableImpl <<< i: " + i);
			
			// **** ****
			try {
				if (i == MAX_KEY / 3)
					ht.put(null, i * 2);
				else if(i == MAX_KEY / 2)
					ht.put(i, null);
				else
					ht.put(i, i * 2);
			} catch (Exception e) {
				System.err.println("hashTableImpl <<< EXCEPTION i: " + i + " " + e.getMessage());
			}
		}
		
		// **** display the Hashtable ****
		System.out.println("hashTableImpl <<< ht: " + ht.toString());
	}
	
	
	/*
	 * HashMap is not thread-safe (external synchronization)
	 * HashMap allows one null key and null values
	 */
	static void hasMapImpl() {
		
		HashMap<Integer, Integer> hm = new HashMap<Integer, Integer>();
		
		// **** populate the HashMap ****
		for (int i = 0; i < MAX_KEY; i++) {
			
			// ???? ????
			System.out.println("hasMapImpl <<< i: " + i);
			
			// **** ****
			try {
				if (i == MAX_KEY / 3)
					hm.put(null, i * 2);
				else if(i == MAX_KEY / 2)
					hm.put(i, null);
				else
					hm.put(i, i * 2);
			} catch (Exception e) {
				System.err.println("hasMapImpl <<< EXCEPTION i: " + i + " " + e.getMessage());
			}
		}
		
		// **** display the HashMap ****
		System.out.println("hasMapImpl <<< hm: " + hm.toString());
	}
	
	
	/*
	 * 
	 */
	static void hashTableThreads() {
		
		// **** ****
		Hashtable<Integer, Integer> ht = new Hashtable<Integer, Integer>();
		
		// **** ****
		CountDownLatch latch = new CountDownLatch(3);

		// **** ****
		long startTime = System.nanoTime();

		// **** create and start threads ****
		new Thread(new HashTableThread(ht,    0, 1000, latch)).start();
		new Thread(new HashTableThread(ht, 1000, 2000, latch)).start();
		new Thread(new HashTableThread(ht, 2000, 3000, latch)).start();
				
		// **** wait for all threads to finish ****
		try {
			latch.await();
		} catch (InterruptedException e) {
			System.err.println("hashTableThreads <<< EXCEPTION " + e.getMessage());
			e.printStackTrace();
		}
		
		// **** ****
		long stopTime = System.nanoTime();
		long elapsedTime = stopTime - startTime;
		System.out.println("hashTableThreads <<< threads finished elapsedTime: " + elapsedTime + " ns");
		
		// **** display the Hashtable ****
		System.out.println("hashTableThreads <<< ht.size: " + ht.size());
		System.out.println("hashTableThreads <<<      ht: " + ht.toString());
	}
	
	
	/*
	 * 
	 */
	static void hashMapThreads() {
		
		// **** ****
		HashMap<Integer, Integer> hm = new HashMap<Integer, Integer>();
		
		// **** ****
		CountDownLatch latch = new CountDownLatch(3);

		// **** ****
		long startTime = System.nanoTime();
		
		// **** create and start threads ****
		new Thread(new HashMapThread(hm,    0, 1000, latch)).start();
		new Thread(new HashMapThread(hm, 1000, 2000, latch)).start();
		new Thread(new HashMapThread(hm, 2000, 3000, latch)).start();
		
		// **** wait for all threads to finish ****
		try {
			latch.await();
		} catch (InterruptedException e) {
			System.err.println("hashMapThreads <<< EXCEPTION " + e.getMessage());
			e.printStackTrace();
		}
		
		// **** ****
		long stopTime = System.nanoTime();
		long elapsedTime = stopTime - startTime;
		System.out.println("hashMapThreads <<< threads finished elapsedTime: " + elapsedTime + " ns");
		
		// **** display the HashMap ****
		System.out.println("hashMapThreads <<< hm.size: " + hm.size());
		System.out.println("hashMapThreads <<<      hm: " + hm.toString());
	}
	
	
	/*
	 * 
	 */
	public static void main(String[] args) {

		// **** Hashtable implementation ****
		hashTableImpl();
		System.out.println();
		
		// **** HashMap implementation ****
		hasMapImpl();
		System.out.println();

		// **** Hashtable thread(s) ****
		hashTableThreads();
		System.out.println();
		
		// **** *HashMap thread(s) ****
		hashMapThreads();
		System.out.println();
		
		// **** ****
		System.out.println("main <<< all done!!!");
	}

}

The main() function contains four functions. The hashTableImpl() declares a Hashtable object and attempts to populate it with integer value pairs. In a couple points the code attempts to insert a null key and a null value. When all is done the contents of the hash table are displayed.

The hashMapImpl() function is a parallel implementation using the HashMap class.

We then have the hashTableThreads() function which instantiates a Hashtable object and spawns three threads. Each thread should enter a set of non overlapping values. When all is done, the size of the hash table and its associated contents are displayed.

Finally, the hashMapThreads() function is a parallel implementation using the HashMap class. The idea behind the two taller functions is to check concurrency issues that may arise.

The output for our program follows:

hashTableImpl <<< i: 0
hashTableImpl <<< i: 1
hashTableImpl <<< i: 2
hashTableImpl <<< i: 3
hashTableImpl <<< i: 4
hashTableImpl <<< i: 5
hashTableImpl <<< i: 6
hashTableImpl <<< EXCEPTION i: 3 null
hashTableImpl <<< i: 7
hashTableImpl <<< i: 8
hashTableImpl <<< i: 9
hashTableImpl <<< i: 10
hashTableImpl <<< ht: {10=20, 9=18, 8=16, 7=14, 6=12, 4=8, 2=4, 1=2, 0=0}
hashTableImpl <<< EXCEPTION i: 5 null

hasMapImpl <<< i: 0
hasMapImpl <<< i: 1
hasMapImpl <<< i: 2
hasMapImpl <<< i: 3
hasMapImpl <<< i: 4
hasMapImpl <<< i: 5
hasMapImpl <<< i: 6
hasMapImpl <<< i: 7
hasMapImpl <<< i: 8
hasMapImpl <<< i: 9
hasMapImpl <<< i: 10
hasMapImpl <<< hm: {0=0, null=6, 1=2, 2=4, 4=8, 5=null, 6=12, 7=14, 8=16, 9=18, 10=20}

hashTableThreads <<< threads finished elapsedTime: 6907198 ns
hashTableThreads <<< ht.size: 3000
hashTableThreads <<<      ht: {2999=5998, 2998=5996, 2997=5994, 2996=5992, 2995=5990, 2994=5988, 2993=5986, 2992=5984, 2991=5982, 2990=5980, 2989=5978, 2988=5976, 2987=5974, 2986=5972, 2985=5970, 2984=5968, 2983=5966, 2982=5964, 2981=5962, 2980=5960, 2979=5958, 2978=5956, 2977=5954, 2976=5952, 2975=5950, 2974=5948, 2973=5946, 2972=5944, 2971=5942, 2970=5940, 2969=5938, 2968=5936, 2967=5934, 2966=5932, 2965=5930, 2964=5928, 2963=5926, 2962=5924, 2961=5922, 2960=5920, 2959=5918, 2958=5916, 2957=5914, 2956=5912, 2955=5910, 2954=5908, 2953=5906, 2952=5904, 2951=5902, 2950=5900, 2949=5898, 2948=5896, 2947=5894, 2946=5892, 2945=5890, 2944=5888, 2943=5886, 2942=5884, 2941=5882, 2940=5880, 2939=5878, 2938=5876, 2937=5874, 2936=5872, 2935=5870, 2934=5868, 2933=5866, 2932=5864, 2931=5862, 2930=5860, 2929=5858, 2928=5856, 2927=5854, 2926=5852, 2925=5850, 2924=5848, 2923=5846, 2922=5844, 2921=5842, 2920=5840, 2919=5838, 2918=5836, 2917=5834, 2916=5832, 2915=5830, 2914=5828, 2913=5826, 2912=5824, 2911=5822, 2910=5820, 2909=5818, 2908=5816, 2907=5814, 2906=5812, 2905=5810, 2904=5808, 2903=5806, 2902=5804, 2901=5802, 2900=5800, 2899=5798, 2898=5796, 2897=5794, 2896=5792, 2895=5790, 2894=5788, 2893=5786, 2892=5784, 2891=5782, 2890=5780, 2889=5778, 2888=5776, 2887=5774, 2886=5772, 2885=5770, 2884=5768, 2883=5766, 2882=5764, 2881=5762, 2880=5760, 2879=5758, 2878=5756, 2877=5754, 2876=5752, 2875=5750, 2874=5748, 2873=5746, 2872=5744, 2871=5742, 2870=5740, 2869=5738, 2868=5736, 2867=5734, 2866=5732, 2865=5730, 2864=5728, 2863=5726, 2862=5724, 2861=5722, 2860=5720, 2859=5718, 2858=5716, 2857=5714, 2856=5712, 2855=5710, 2854=5708, 2853=5706, 2852=5704, 2851=5702, 2850=5700, 2849=5698, 2848=5696, 2847=5694, 2846=5692, 2845=5690, 2844=5688, 2843=5686, 2842=5684, 2841=5682, 2840=5680, 2839=5678, 2838=5676, 2837=5674, 2836=5672, 2835=5670, 2834=5668, 2833=5666, 2832=5664, 2831=5662, 2830=5660, 2829=5658, 2828=5656, 2827=5654, 2826=5652, 2825=5650, 2824=5648, 2823=5646, 2822=5644, 2821=5642, 2820=5640, 2819=5638, 2818=5636, 2817=5634, 2816=5632, 2815=5630, 2814=5628, 2813=5626, 2812=5624, 2811=5622, 2810=5620, 2809=5618, 2808=5616, 2807=5614, 2806=5612, 2805=5610, 2804=5608, 2803=5606, 2802=5604, 2801=5602, 2800=5600, 2799=5598, 2798=5596, 2797=5594, 2796=5592, 2795=5590, 2794=5588, 2793=5586, 2792=5584, 2791=5582, 2790=5580, 2789=5578, 2788=5576, 2787=5574, 2786=5572, 2785=5570, 2784=5568, 2783=5566, 2782=5564, 2781=5562, 2780=5560, 2779=5558, 2778=5556, 2777=5554, 2776=5552, 2775=5550, 2774=5548, 2773=5546, 2772=5544, 2771=5542, 2770=5540, 2769=5538, 2768=5536, 2767=5534, 2766=5532, 2765=5530, 2764=5528, 2763=5526, 2762=5524, 2761=5522, 2760=5520, 2759=5518, 2758=5516, 2757=5514, 2756=5512, 2755=5510, 2754=5508, 2753=5506, 2752=5504, 2751=5502, 2750=5500, 2749=5498, 2748=5496, 2747=5494, 2746=5492, 2745=5490, 2744=5488, 2743=5486, 2742=5484, 2741=5482, 2740=5480, 2739=5478, 2738=5476, 2737=5474, 2736=5472, 2735=5470, 2734=5468, 2733=5466, 2732=5464, 2731=5462, 2730=5460, 2729=5458, 2728=5456, 2727=5454, 2726=5452, 2725=5450, 2724=5448, 2723=5446, 2722=5444, 2721=5442, 2720=5440, 2719=5438, 2718=5436, 2717=5434, 2716=5432, 2715=5430, 2714=5428, 2713=5426, 2712=5424, 2711=5422, 2710=5420, 2709=5418, 2708=5416, 2707=5414, 2706=5412, 2705=5410, 2704=5408, 2703=5406, 2702=5404, 2701=5402, 2700=5400, 2699=5398, 2698=5396, 2697=5394, 2696=5392, 2695=5390, 2694=5388, 2693=5386, 2692=5384, 2691=5382, 2690=5380, 2689=5378, 2688=5376, 2687=5374, 2686=5372, 2685=5370, 2684=5368, 2683=5366, 2682=5364, 2681=5362, 2680=5360, 2679=5358, 2678=5356, 2677=5354, 2676=5352, 2675=5350, 2674=5348, 2673=5346, 2672=5344, 2671=5342, 2670=5340, 2669=5338, 2668=5336, 2667=5334, 2666=5332, 2665=5330, 2664=5328, 2663=5326, 2662=5324, 2661=5322, 2660=5320, 2659=5318, 2658=5316, 2657=5314, 2656=5312, 2655=5310, 2654=5308, 2653=5306, 2652=5304, 2651=5302, 2650=5300, 2649=5298, 2648=5296, 2647=5294, 2646=5292, 2645=5290, 2644=5288, 2643=5286, 2642=5284, 2641=5282, 2640=5280, 2639=5278, 2638=5276, 2637=5274, 2636=5272, 2635=5270, 2634=5268, 2633=5266, 2632=5264, 2631=5262, 2630=5260, 2629=5258, 2628=5256, 2627=5254, 2626=5252, 2625=5250, 2624=5248, 2623=5246, 2622=5244, 2621=5242, 2620=5240, 2619=5238, 2618=5236, 2617=5234, 2616=5232, 2615=5230, 2614=5228, 2613=5226, 2612=5224, 2611=5222, 2610=5220, 2609=5218, 2608=5216, 2607=5214, 2606=5212, 2605=5210, 2604=5208, 2603=5206, 2602=5204, 2601=5202, 2600=5200, 2599=5198, 2598=5196, 2597=5194, 2596=5192, 2595=5190, 2594=5188, 2593=5186, 2592=5184, 2591=5182, 2590=5180, 2589=5178, 2588=5176, 2587=5174, 2586=5172, 2585=5170, 2584=5168, 2583=5166, 2582=5164, 2581=5162, 2580=5160, 2579=5158, 2578=5156, 2577=5154, 2576=5152, 2575=5150, 2574=5148, 2573=5146, 2572=5144, 2571=5142, 2570=5140, 2569=5138, 2568=5136, 2567=5134, 2566=5132, 2565=5130, 2564=5128, 2563=5126, 2562=5124, 2561=5122, 2560=5120, 2559=5118, 2558=5116, 2557=5114, 2556=5112, 2555=5110, 2554=5108, 2553=5106, 2552=5104, 2551=5102, 2550=5100, 2549=5098, 2548=5096, 2547=5094, 2546=5092, 2545=5090, 2544=5088, 2543=5086, 2542=5084, 2541=5082, 2540=5080, 2539=5078, 2538=5076, 2537=5074, 2536=5072, 2535=5070, 2534=5068, 2533=5066, 2532=5064, 2531=5062, 2530=5060, 2529=5058, 2528=5056, 2527=5054, 2526=5052, 2525=5050, 2524=5048, 2523=5046, 2522=5044, 2521=5042, 2520=5040, 2519=5038, 2518=5036, 2517=5034, 2516=5032, 2515=5030, 2514=5028, 2513=5026, 2512=5024, 2511=5022, 2510=5020, 2509=5018, 2508=5016, 2507=5014, 2506=5012, 2505=5010, 2504=5008, 2503=5006, 2502=5004, 2501=5002, 2500=5000, 2499=4998, 2498=4996, 2497=4994, 2496=4992, 2495=4990, 2494=4988, 2493=4986, 2492=4984, 2491=4982, 2490=4980, 2489=4978, 2488=4976, 2487=4974, 2486=4972, 2485=4970, 2484=4968, 2483=4966, 2482=4964, 2481=4962, 2480=4960, 2479=4958, 2478=4956, 2477=4954, 2476=4952, 2475=4950, 2474=4948, 2473=4946, 2472=4944, 2471=4942, 2470=4940, 2469=4938, 2468=4936, 2467=4934, 2466=4932, 2465=4930, 2464=4928, 2463=4926, 2462=4924, 2461=4922, 2460=4920, 2459=4918, 2458=4916, 2457=4914, 2456=4912, 2455=4910, 2454=4908, 2453=4906, 2452=4904, 2451=4902, 2450=4900, 2449=4898, 2448=4896, 2447=4894, 2446=4892, 2445=4890, 2444=4888, 2443=4886, 2442=4884, 2441=4882, 2440=4880, 2439=4878, 2438=4876, 2437=4874, 2436=4872, 2435=4870, 2434=4868, 2433=4866, 2432=4864, 2431=4862, 2430=4860, 2429=4858, 2428=4856, 2427=4854, 2426=4852, 2425=4850, 2424=4848, 2423=4846, 2422=4844, 2421=4842, 2420=4840, 2419=4838, 2418=4836, 2417=4834, 2416=4832, 2415=4830, 2414=4828, 2413=4826, 2412=4824, 2411=4822, 2410=4820, 2409=4818, 2408=4816, 2407=4814, 2406=4812, 2405=4810, 2404=4808, 2403=4806, 2402=4804, 2401=4802, 2400=4800, 2399=4798, 2398=4796, 2397=4794, 2396=4792, 2395=4790, 2394=4788, 2393=4786, 2392=4784, 2391=4782, 2390=4780, 2389=4778, 2388=4776, 2387=4774, 2386=4772, 2385=4770, 2384=4768, 2383=4766, 2382=4764, 2381=4762, 2380=4760, 2379=4758, 2378=4756, 2377=4754, 2376=4752, 2375=4750, 2374=4748, 2373=4746, 2372=4744, 2371=4742, 2370=4740, 2369=4738, 2368=4736, 2367=4734, 2366=4732, 2365=4730, 2364=4728, 2363=4726, 2362=4724, 2361=4722, 2360=4720, 2359=4718, 2358=4716, 2357=4714, 2356=4712, 2355=4710, 2354=4708, 2353=4706, 2352=4704, 2351=4702, 2350=4700, 2349=4698, 2348=4696, 2347=4694, 2346=4692, 2345=4690, 2344=4688, 2343=4686, 2342=4684, 2341=4682, 2340=4680, 2339=4678, 2338=4676, 2337=4674, 2336=4672, 2335=4670, 2334=4668, 2333=4666, 2332=4664, 2331=4662, 2330=4660, 2329=4658, 2328=4656, 2327=4654, 2326=4652, 2325=4650, 2324=4648, 2323=4646, 2322=4644, 2321=4642, 2320=4640, 2319=4638, 2318=4636, 2317=4634, 2316=4632, 2315=4630, 2314=4628, 2313=4626, 2312=4624, 2311=4622, 2310=4620, 2309=4618, 2308=4616, 2307=4614, 2306=4612, 2305=4610, 2304=4608, 2303=4606, 2302=4604, 2301=4602, 2300=4600, 2299=4598, 2298=4596, 2297=4594, 2296=4592, 2295=4590, 2294=4588, 2293=4586, 2292=4584, 2291=4582, 2290=4580, 2289=4578, 2288=4576, 2287=4574, 2286=4572, 2285=4570, 2284=4568, 2283=4566, 2282=4564, 2281=4562, 2280=4560, 2279=4558, 2278=4556, 2277=4554, 2276=4552, 2275=4550, 2274=4548, 2273=4546, 2272=4544, 2271=4542, 2270=4540, 2269=4538, 2268=4536, 2267=4534, 2266=4532, 2265=4530, 2264=4528, 2263=4526, 2262=4524, 2261=4522, 2260=4520, 2259=4518, 2258=4516, 2257=4514, 2256=4512, 2255=4510, 2254=4508, 2253=4506, 2252=4504, 2251=4502, 2250=4500, 2249=4498, 2248=4496, 2247=4494, 2246=4492, 2245=4490, 2244=4488, 2243=4486, 2242=4484, 2241=4482, 2240=4480, 2239=4478, 2238=4476, 2237=4474, 2236=4472, 2235=4470, 2234=4468, 2233=4466, 2232=4464, 2231=4462, 2230=4460, 2229=4458, 2228=4456, 2227=4454, 2226=4452, 2225=4450, 2224=4448, 2223=4446, 2222=4444, 2221=4442, 2220=4440, 2219=4438, 2218=4436, 2217=4434, 2216=4432, 2215=4430, 2214=4428, 2213=4426, 2212=4424, 2211=4422, 2210=4420, 2209=4418, 2208=4416, 2207=4414, 2206=4412, 2205=4410, 2204=4408, 2203=4406, 2202=4404, 2201=4402, 2200=4400, 2199=4398, 2198=4396, 2197=4394, 2196=4392, 2195=4390, 2194=4388, 2193=4386, 2192=4384, 2191=4382, 2190=4380, 2189=4378, 2188=4376, 2187=4374, 2186=4372, 2185=4370, 2184=4368, 2183=4366, 2182=4364, 2181=4362, 2180=4360, 2179=4358, 2178=4356, 2177=4354, 2176=4352, 2175=4350, 2174=4348, 2173=4346, 2172=4344, 2171=4342, 2170=4340, 2169=4338, 2168=4336, 2167=4334, 2166=4332, 2165=4330, 2164=4328, 2163=4326, 2162=4324, 2161=4322, 2160=4320, 2159=4318, 2158=4316, 2157=4314, 2156=4312, 2155=4310, 2154=4308, 2153=4306, 2152=4304, 2151=4302, 2150=4300, 2149=4298, 2148=4296, 2147=4294, 2146=4292, 2145=4290, 2144=4288, 2143=4286, 2142=4284, 2141=4282, 2140=4280, 2139=4278, 2138=4276, 2137=4274, 2136=4272, 2135=4270, 2134=4268, 2133=4266, 2132=4264, 2131=4262, 2130=4260, 2129=4258, 2128=4256, 2127=4254, 2126=4252, 2125=4250, 2124=4248, 2123=4246, 2122=4244, 2121=4242, 2120=4240, 2119=4238, 2118=4236, 2117=4234, 2116=4232, 2115=4230, 2114=4228, 2113=4226, 2112=4224, 2111=4222, 2110=4220, 2109=4218, 2108=4216, 2107=4214, 2106=4212, 2105=4210, 2104=4208, 2103=4206, 2102=4204, 2101=4202, 2100=4200, 2099=4198, 2098=4196, 2097=4194, 2096=4192, 2095=4190, 2094=4188, 2093=4186, 2092=4184, 2091=4182, 2090=4180, 2089=4178, 2088=4176, 2087=4174, 2086=4172, 2085=4170, 2084=4168, 2083=4166, 2082=4164, 2081=4162, 2080=4160, 2079=4158, 2078=4156, 2077=4154, 2076=4152, 2075=4150, 2074=4148, 2073=4146, 2072=4144, 2071=4142, 2070=4140, 2069=4138, 2068=4136, 2067=4134, 2066=4132, 2065=4130, 2064=4128, 2063=4126, 2062=4124, 2061=4122, 2060=4120, 2059=4118, 2058=4116, 2057=4114, 2056=4112, 2055=4110, 2054=4108, 2053=4106, 2052=4104, 2051=4102, 2050=4100, 2049=4098, 2048=4096, 2047=4094, 2046=4092, 2045=4090, 2044=4088, 2043=4086, 2042=4084, 2041=4082, 2040=4080, 2039=4078, 2038=4076, 2037=4074, 2036=4072, 2035=4070, 2034=4068, 2033=4066, 2032=4064, 2031=4062, 2030=4060, 2029=4058, 2028=4056, 2027=4054, 2026=4052, 2025=4050, 2024=4048, 2023=4046, 2022=4044, 2021=4042, 2020=4040, 2019=4038, 2018=4036, 2017=4034, 2016=4032, 2015=4030, 2014=4028, 2013=4026, 2012=4024, 2011=4022, 2010=4020, 2009=4018, 2008=4016, 2007=4014, 2006=4012, 2005=4010, 2004=4008, 2003=4006, 2002=4004, 2001=4002, 2000=4000, 1999=3998, 1998=3996, 1997=3994, 1996=3992, 1995=3990, 1994=3988, 1993=3986, 1992=3984, 1991=3982, 1990=3980, 1989=3978, 1988=3976, 1987=3974, 1986=3972, 1985=3970, 1984=3968, 1983=3966, 1982=3964, 1981=3962, 1980=3960, 1979=3958, 1978=3956, 1977=3954, 1976=3952, 1975=3950, 1974=3948, 1973=3946, 1972=3944, 1971=3942, 1970=3940, 1969=3938, 1968=3936, 1967=3934, 1966=3932, 1965=3930, 1964=3928, 1963=3926, 1962=3924, 1961=3922, 1960=3920, 1959=3918, 1958=3916, 1957=3914, 1956=3912, 1955=3910, 1954=3908, 1953=3906, 1952=3904, 1951=3902, 1950=3900, 1949=3898, 1948=3896, 1947=3894, 1946=3892, 1945=3890, 1944=3888, 1943=3886, 1942=3884, 1941=3882, 1940=3880, 1939=3878, 1938=3876, 1937=3874, 1936=3872, 1935=3870, 1934=3868, 1933=3866, 1932=3864, 1931=3862, 1930=3860, 1929=3858, 1928=3856, 1927=3854, 1926=3852, 1925=3850, 1924=3848, 1923=3846, 1922=3844, 1921=3842, 1920=3840, 1919=3838, 1918=3836, 1917=3834, 1916=3832, 1915=3830, 1914=3828, 1913=3826, 1912=3824, 1911=3822, 1910=3820, 1909=3818, 1908=3816, 1907=3814, 1906=3812, 1905=3810, 1904=3808, 1903=3806, 1902=3804, 1901=3802, 1900=3800, 1899=3798, 1898=3796, 1897=3794, 1896=3792, 1895=3790, 1894=3788, 1893=3786, 1892=3784, 1891=3782, 1890=3780, 1889=3778, 1888=3776, 1887=3774, 1886=3772, 1885=3770, 1884=3768, 1883=3766, 1882=3764, 1881=3762, 1880=3760, 1879=3758, 1878=3756, 1877=3754, 1876=3752, 1875=3750, 1874=3748, 1873=3746, 1872=3744, 1871=3742, 1870=3740, 1869=3738, 1868=3736, 1867=3734, 1866=3732, 1865=3730, 1864=3728, 1863=3726, 1862=3724, 1861=3722, 1860=3720, 1859=3718, 1858=3716, 1857=3714, 1856=3712, 1855=3710, 1854=3708, 1853=3706, 1852=3704, 1851=3702, 1850=3700, 1849=3698, 1848=3696, 1847=3694, 1846=3692, 1845=3690, 1844=3688, 1843=3686, 1842=3684, 1841=3682, 1840=3680, 1839=3678, 1838=3676, 1837=3674, 1836=3672, 1835=3670, 1834=3668, 1833=3666, 1832=3664, 1831=3662, 1830=3660, 1829=3658, 1828=3656, 1827=3654, 1826=3652, 1825=3650, 1824=3648, 1823=3646, 1822=3644, 1821=3642, 1820=3640, 1819=3638, 1818=3636, 1817=3634, 1816=3632, 1815=3630, 1814=3628, 1813=3626, 1812=3624, 1811=3622, 1810=3620, 1809=3618, 1808=3616, 1807=3614, 1806=3612, 1805=3610, 1804=3608, 1803=3606, 1802=3604, 1801=3602, 1800=3600, 1799=3598, 1798=3596, 1797=3594, 1796=3592, 1795=3590, 1794=3588, 1793=3586, 1792=3584, 1791=3582, 1790=3580, 1789=3578, 1788=3576, 1787=3574, 1786=3572, 1785=3570, 1784=3568, 1783=3566, 1782=3564, 1781=3562, 1780=3560, 1779=3558, 1778=3556, 1777=3554, 1776=3552, 1775=3550, 1774=3548, 1773=3546, 1772=3544, 1771=3542, 1770=3540, 1769=3538, 1768=3536, 1767=3534, 1766=3532, 1765=3530, 1764=3528, 1763=3526, 1762=3524, 1761=3522, 1760=3520, 1759=3518, 1758=3516, 1757=3514, 1756=3512, 1755=3510, 1754=3508, 1753=3506, 1752=3504, 1751=3502, 1750=3500, 1749=3498, 1748=3496, 1747=3494, 1746=3492, 1745=3490, 1744=3488, 1743=3486, 1742=3484, 1741=3482, 1740=3480, 1739=3478, 1738=3476, 1737=3474, 1736=3472, 1735=3470, 1734=3468, 1733=3466, 1732=3464, 1731=3462, 1730=3460, 1729=3458, 1728=3456, 1727=3454, 1726=3452, 1725=3450, 1724=3448, 1723=3446, 1722=3444, 1721=3442, 1720=3440, 1719=3438, 1718=3436, 1717=3434, 1716=3432, 1715=3430, 1714=3428, 1713=3426, 1712=3424, 1711=3422, 1710=3420, 1709=3418, 1708=3416, 1707=3414, 1706=3412, 1705=3410, 1704=3408, 1703=3406, 1702=3404, 1701=3402, 1700=3400, 1699=3398, 1698=3396, 1697=3394, 1696=3392, 1695=3390, 1694=3388, 1693=3386, 1692=3384, 1691=3382, 1690=3380, 1689=3378, 1688=3376, 1687=3374, 1686=3372, 1685=3370, 1684=3368, 1683=3366, 1682=3364, 1681=3362, 1680=3360, 1679=3358, 1678=3356, 1677=3354, 1676=3352, 1675=3350, 1674=3348, 1673=3346, 1672=3344, 1671=3342, 1670=3340, 1669=3338, 1668=3336, 1667=3334, 1666=3332, 1665=3330, 1664=3328, 1663=3326, 1662=3324, 1661=3322, 1660=3320, 1659=3318, 1658=3316, 1657=3314, 1656=3312, 1655=3310, 1654=3308, 1653=3306, 1652=3304, 1651=3302, 1650=3300, 1649=3298, 1648=3296, 1647=3294, 1646=3292, 1645=3290, 1644=3288, 1643=3286, 1642=3284, 1641=3282, 1640=3280, 1639=3278, 1638=3276, 1637=3274, 1636=3272, 1635=3270, 1634=3268, 1633=3266, 1632=3264, 1631=3262, 1630=3260, 1629=3258, 1628=3256, 1627=3254, 1626=3252, 1625=3250, 1624=3248, 1623=3246, 1622=3244, 1621=3242, 1620=3240, 1619=3238, 1618=3236, 1617=3234, 1616=3232, 1615=3230, 1614=3228, 1613=3226, 1612=3224, 1611=3222, 1610=3220, 1609=3218, 1608=3216, 1607=3214, 1606=3212, 1605=3210, 1604=3208, 1603=3206, 1602=3204, 1601=3202, 1600=3200, 1599=3198, 1598=3196, 1597=3194, 1596=3192, 1595=3190, 1594=3188, 1593=3186, 1592=3184, 1591=3182, 1590=3180, 1589=3178, 1588=3176, 1587=3174, 1586=3172, 1585=3170, 1584=3168, 1583=3166, 1582=3164, 1581=3162, 1580=3160, 1579=3158, 1578=3156, 1577=3154, 1576=3152, 1575=3150, 1574=3148, 1573=3146, 1572=3144, 1571=3142, 1570=3140, 1569=3138, 1568=3136, 1567=3134, 1566=3132, 1565=3130, 1564=3128, 1563=3126, 1562=3124, 1561=3122, 1560=3120, 1559=3118, 1558=3116, 1557=3114, 1556=3112, 1555=3110, 1554=3108, 1553=3106, 1552=3104, 1551=3102, 1550=3100, 1549=3098, 1548=3096, 1547=3094, 1546=3092, 1545=3090, 1544=3088, 1543=3086, 1542=3084, 1541=3082, 1540=3080, 1539=3078, 1538=3076, 1537=3074, 1536=3072, 1535=3070, 1534=3068, 1533=3066, 1532=3064, 1531=3062, 1530=3060, 1529=3058, 1528=3056, 1527=3054, 1526=3052, 1525=3050, 1524=3048, 1523=3046, 1522=3044, 1521=3042, 1520=3040, 1519=3038, 1518=3036, 1517=3034, 1516=3032, 1515=3030, 1514=3028, 1513=3026, 1512=3024, 1511=3022, 1510=3020, 1509=3018, 1508=3016, 1507=3014, 1506=3012, 1505=3010, 1504=3008, 1503=3006, 1502=3004, 1501=3002, 1500=3000, 1499=2998, 1498=2996, 1497=2994, 1496=2992, 1495=2990, 1494=2988, 1493=2986, 1492=2984, 1491=2982, 1490=2980, 1489=2978, 1488=2976, 1487=2974, 1486=2972, 1485=2970, 1484=2968, 1483=2966, 1482=2964, 1481=2962, 1480=2960, 1479=2958, 1478=2956, 1477=2954, 1476=2952, 1475=2950, 1474=2948, 1473=2946, 1472=2944, 1471=2942, 1470=2940, 1469=2938, 1468=2936, 1467=2934, 1466=2932, 1465=2930, 1464=2928, 1463=2926, 1462=2924, 1461=2922, 1460=2920, 1459=2918, 1458=2916, 1457=2914, 1456=2912, 1455=2910, 1454=2908, 1453=2906, 1452=2904, 1451=2902, 1450=2900, 1449=2898, 1448=2896, 1447=2894, 1446=2892, 1445=2890, 1444=2888, 1443=2886, 1442=2884, 1441=2882, 1440=2880, 1439=2878, 1438=2876, 1437=2874, 1436=2872, 1435=2870, 1434=2868, 1433=2866, 1432=2864, 1431=2862, 1430=2860, 1429=2858, 1428=2856, 1427=2854, 1426=2852, 1425=2850, 1424=2848, 1423=2846, 1422=2844, 1421=2842, 1420=2840, 1419=2838, 1418=2836, 1417=2834, 1416=2832, 1415=2830, 1414=2828, 1413=2826, 1412=2824, 1411=2822, 1410=2820, 1409=2818, 1408=2816, 1407=2814, 1406=2812, 1405=2810, 1404=2808, 1403=2806, 1402=2804, 1401=2802, 1400=2800, 1399=2798, 1398=2796, 1397=2794, 1396=2792, 1395=2790, 1394=2788, 1393=2786, 1392=2784, 1391=2782, 1390=2780, 1389=2778, 1388=2776, 1387=2774, 1386=2772, 1385=2770, 1384=2768, 1383=2766, 1382=2764, 1381=2762, 1380=2760, 1379=2758, 1378=2756, 1377=2754, 1376=2752, 1375=2750, 1374=2748, 1373=2746, 1372=2744, 1371=2742, 1370=2740, 1369=2738, 1368=2736, 1367=2734, 1366=2732, 1365=2730, 1364=2728, 1363=2726, 1362=2724, 1361=2722, 1360=2720, 1359=2718, 1358=2716, 1357=2714, 1356=2712, 1355=2710, 1354=2708, 1353=2706, 1352=2704, 1351=2702, 1350=2700, 1349=2698, 1348=2696, 1347=2694, 1346=2692, 1345=2690, 1344=2688, 1343=2686, 1342=2684, 1341=2682, 1340=2680, 1339=2678, 1338=2676, 1337=2674, 1336=2672, 1335=2670, 1334=2668, 1333=2666, 1332=2664, 1331=2662, 1330=2660, 1329=2658, 1328=2656, 1327=2654, 1326=2652, 1325=2650, 1324=2648, 1323=2646, 1322=2644, 1321=2642, 1320=2640, 1319=2638, 1318=2636, 1317=2634, 1316=2632, 1315=2630, 1314=2628, 1313=2626, 1312=2624, 1311=2622, 1310=2620, 1309=2618, 1308=2616, 1307=2614, 1306=2612, 1305=2610, 1304=2608, 1303=2606, 1302=2604, 1301=2602, 1300=2600, 1299=2598, 1298=2596, 1297=2594, 1296=2592, 1295=2590, 1294=2588, 1293=2586, 1292=2584, 1291=2582, 1290=2580, 1289=2578, 1288=2576, 1287=2574, 1286=2572, 1285=2570, 1284=2568, 1283=2566, 1282=2564, 1281=2562, 1280=2560, 1279=2558, 1278=2556, 1277=2554, 1276=2552, 1275=2550, 1274=2548, 1273=2546, 1272=2544, 1271=2542, 1270=2540, 1269=2538, 1268=2536, 1267=2534, 1266=2532, 1265=2530, 1264=2528, 1263=2526, 1262=2524, 1261=2522, 1260=2520, 1259=2518, 1258=2516, 1257=2514, 1256=2512, 1255=2510, 1254=2508, 1253=2506, 1252=2504, 1251=2502, 1250=2500, 1249=2498, 1248=2496, 1247=2494, 1246=2492, 1245=2490, 1244=2488, 1243=2486, 1242=2484, 1241=2482, 1240=2480, 1239=2478, 1238=2476, 1237=2474, 1236=2472, 1235=2470, 1234=2468, 1233=2466, 1232=2464, 1231=2462, 1230=2460, 1229=2458, 1228=2456, 1227=2454, 1226=2452, 1225=2450, 1224=2448, 1223=2446, 1222=2444, 1221=2442, 1220=2440, 1219=2438, 1218=2436, 1217=2434, 1216=2432, 1215=2430, 1214=2428, 1213=2426, 1212=2424, 1211=2422, 1210=2420, 1209=2418, 1208=2416, 1207=2414, 1206=2412, 1205=2410, 1204=2408, 1203=2406, 1202=2404, 1201=2402, 1200=2400, 1199=2398, 1198=2396, 1197=2394, 1196=2392, 1195=2390, 1194=2388, 1193=2386, 1192=2384, 1191=2382, 1190=2380, 1189=2378, 1188=2376, 1187=2374, 1186=2372, 1185=2370, 1184=2368, 1183=2366, 1182=2364, 1181=2362, 1180=2360, 1179=2358, 1178=2356, 1177=2354, 1176=2352, 1175=2350, 1174=2348, 1173=2346, 1172=2344, 1171=2342, 1170=2340, 1169=2338, 1168=2336, 1167=2334, 1166=2332, 1165=2330, 1164=2328, 1163=2326, 1162=2324, 1161=2322, 1160=2320, 1159=2318, 1158=2316, 1157=2314, 1156=2312, 1155=2310, 1154=2308, 1153=2306, 1152=2304, 1151=2302, 1150=2300, 1149=2298, 1148=2296, 1147=2294, 1146=2292, 1145=2290, 1144=2288, 1143=2286, 1142=2284, 1141=2282, 1140=2280, 1139=2278, 1138=2276, 1137=2274, 1136=2272, 1135=2270, 1134=2268, 1133=2266, 1132=2264, 1131=2262, 1130=2260, 1129=2258, 1128=2256, 1127=2254, 1126=2252, 1125=2250, 1124=2248, 1123=2246, 1122=2244, 1121=2242, 1120=2240, 1119=2238, 1118=2236, 1117=2234, 1116=2232, 1115=2230, 1114=2228, 1113=2226, 1112=2224, 1111=2222, 1110=2220, 1109=2218, 1108=2216, 1107=2214, 1106=2212, 1105=2210, 1104=2208, 1103=2206, 1102=2204, 1101=2202, 1100=2200, 1099=2198, 1098=2196, 1097=2194, 1096=2192, 1095=2190, 1094=2188, 1093=2186, 1092=2184, 1091=2182, 1090=2180, 1089=2178, 1088=2176, 1087=2174, 1086=2172, 1085=2170, 1084=2168, 1083=2166, 1082=2164, 1081=2162, 1080=2160, 1079=2158, 1078=2156, 1077=2154, 1076=2152, 1075=2150, 1074=2148, 1073=2146, 1072=2144, 1071=2142, 1070=2140, 1069=2138, 1068=2136, 1067=2134, 1066=2132, 1065=2130, 1064=2128, 1063=2126, 1062=2124, 1061=2122, 1060=2120, 1059=2118, 1058=2116, 1057=2114, 1056=2112, 1055=2110, 1054=2108, 1053=2106, 1052=2104, 1051=2102, 1050=2100, 1049=2098, 1048=2096, 1047=2094, 1046=2092, 1045=2090, 1044=2088, 1043=2086, 1042=2084, 1041=2082, 1040=2080, 1039=2078, 1038=2076, 1037=2074, 1036=2072, 1035=2070, 1034=2068, 1033=2066, 1032=2064, 1031=2062, 1030=2060, 1029=2058, 1028=2056, 1027=2054, 1026=2052, 1025=2050, 1024=2048, 1023=2046, 1022=2044, 1021=2042, 1020=2040, 1019=2038, 1018=2036, 1017=2034, 1016=2032, 1015=2030, 1014=2028, 1013=2026, 1012=2024, 1011=2022, 1010=2020, 1009=2018, 1008=2016, 1007=2014, 1006=2012, 1005=2010, 1004=2008, 1003=2006, 1002=2004, 1001=2002, 1000=2000, 999=1998, 998=1996, 997=1994, 996=1992, 995=1990, 994=1988, 993=1986, 992=1984, 991=1982, 990=1980, 989=1978, 988=1976, 987=1974, 986=1972, 985=1970, 984=1968, 983=1966, 982=1964, 981=1962, 980=1960, 979=1958, 978=1956, 977=1954, 976=1952, 975=1950, 974=1948, 973=1946, 972=1944, 971=1942, 970=1940, 969=1938, 968=1936, 967=1934, 966=1932, 965=1930, 964=1928, 963=1926, 962=1924, 961=1922, 960=1920, 959=1918, 958=1916, 957=1914, 956=1912, 955=1910, 954=1908, 953=1906, 952=1904, 951=1902, 950=1900, 949=1898, 948=1896, 947=1894, 946=1892, 945=1890, 944=1888, 943=1886, 942=1884, 941=1882, 940=1880, 939=1878, 938=1876, 937=1874, 936=1872, 935=1870, 934=1868, 933=1866, 932=1864, 931=1862, 930=1860, 929=1858, 928=1856, 927=1854, 926=1852, 925=1850, 924=1848, 923=1846, 922=1844, 921=1842, 920=1840, 919=1838, 918=1836, 917=1834, 916=1832, 915=1830, 914=1828, 913=1826, 912=1824, 911=1822, 910=1820, 909=1818, 908=1816, 907=1814, 906=1812, 905=1810, 904=1808, 903=1806, 902=1804, 901=1802, 900=1800, 899=1798, 898=1796, 897=1794, 896=1792, 895=1790, 894=1788, 893=1786, 892=1784, 891=1782, 890=1780, 889=1778, 888=1776, 887=1774, 886=1772, 885=1770, 884=1768, 883=1766, 882=1764, 881=1762, 880=1760, 879=1758, 878=1756, 877=1754, 876=1752, 875=1750, 874=1748, 873=1746, 872=1744, 871=1742, 870=1740, 869=1738, 868=1736, 867=1734, 866=1732, 865=1730, 864=1728, 863=1726, 862=1724, 861=1722, 860=1720, 859=1718, 858=1716, 857=1714, 856=1712, 855=1710, 854=1708, 853=1706, 852=1704, 851=1702, 850=1700, 849=1698, 848=1696, 847=1694, 846=1692, 845=1690, 844=1688, 843=1686, 842=1684, 841=1682, 840=1680, 839=1678, 838=1676, 837=1674, 836=1672, 835=1670, 834=1668, 833=1666, 832=1664, 831=1662, 830=1660, 829=1658, 828=1656, 827=1654, 826=1652, 825=1650, 824=1648, 823=1646, 822=1644, 821=1642, 820=1640, 819=1638, 818=1636, 817=1634, 816=1632, 815=1630, 814=1628, 813=1626, 812=1624, 811=1622, 810=1620, 809=1618, 808=1616, 807=1614, 806=1612, 805=1610, 804=1608, 803=1606, 802=1604, 801=1602, 800=1600, 799=1598, 798=1596, 797=1594, 796=1592, 795=1590, 794=1588, 793=1586, 792=1584, 791=1582, 790=1580, 789=1578, 788=1576, 787=1574, 786=1572, 785=1570, 784=1568, 783=1566, 782=1564, 781=1562, 780=1560, 779=1558, 778=1556, 777=1554, 776=1552, 775=1550, 774=1548, 773=1546, 772=1544, 771=1542, 770=1540, 769=1538, 768=1536, 767=1534, 766=1532, 765=1530, 764=1528, 763=1526, 762=1524, 761=1522, 760=1520, 759=1518, 758=1516, 757=1514, 756=1512, 755=1510, 754=1508, 753=1506, 752=1504, 751=1502, 750=1500, 749=1498, 748=1496, 747=1494, 746=1492, 745=1490, 744=1488, 743=1486, 742=1484, 741=1482, 740=1480, 739=1478, 738=1476, 737=1474, 736=1472, 735=1470, 734=1468, 733=1466, 732=1464, 731=1462, 730=1460, 729=1458, 728=1456, 727=1454, 726=1452, 725=1450, 724=1448, 723=1446, 722=1444, 721=1442, 720=1440, 719=1438, 718=1436, 717=1434, 716=1432, 715=1430, 714=1428, 713=1426, 712=1424, 711=1422, 710=1420, 709=1418, 708=1416, 707=1414, 706=1412, 705=1410, 704=1408, 703=1406, 702=1404, 701=1402, 700=1400, 699=1398, 698=1396, 697=1394, 696=1392, 695=1390, 694=1388, 693=1386, 692=1384, 691=1382, 690=1380, 689=1378, 688=1376, 687=1374, 686=1372, 685=1370, 684=1368, 683=1366, 682=1364, 681=1362, 680=1360, 679=1358, 678=1356, 677=1354, 676=1352, 675=1350, 674=1348, 673=1346, 672=1344, 671=1342, 670=1340, 669=1338, 668=1336, 667=1334, 666=1332, 665=1330, 664=1328, 663=1326, 662=1324, 661=1322, 660=1320, 659=1318, 658=1316, 657=1314, 656=1312, 655=1310, 654=1308, 653=1306, 652=1304, 651=1302, 650=1300, 649=1298, 648=1296, 647=1294, 646=1292, 645=1290, 644=1288, 643=1286, 642=1284, 641=1282, 640=1280, 639=1278, 638=1276, 637=1274, 636=1272, 635=1270, 634=1268, 633=1266, 632=1264, 631=1262, 630=1260, 629=1258, 628=1256, 627=1254, 626=1252, 625=1250, 624=1248, 623=1246, 622=1244, 621=1242, 620=1240, 619=1238, 618=1236, 617=1234, 616=1232, 615=1230, 614=1228, 613=1226, 612=1224, 611=1222, 610=1220, 609=1218, 608=1216, 607=1214, 606=1212, 605=1210, 604=1208, 603=1206, 602=1204, 601=1202, 600=1200, 599=1198, 598=1196, 597=1194, 596=1192, 595=1190, 594=1188, 593=1186, 592=1184, 591=1182, 590=1180, 589=1178, 588=1176, 587=1174, 586=1172, 585=1170, 584=1168, 583=1166, 582=1164, 581=1162, 580=1160, 579=1158, 578=1156, 577=1154, 576=1152, 575=1150, 574=1148, 573=1146, 572=1144, 571=1142, 570=1140, 569=1138, 568=1136, 567=1134, 566=1132, 565=1130, 564=1128, 563=1126, 562=1124, 561=1122, 560=1120, 559=1118, 558=1116, 557=1114, 556=1112, 555=1110, 554=1108, 553=1106, 552=1104, 551=1102, 550=1100, 549=1098, 548=1096, 547=1094, 546=1092, 545=1090, 544=1088, 543=1086, 542=1084, 541=1082, 540=1080, 539=1078, 538=1076, 537=1074, 536=1072, 535=1070, 534=1068, 533=1066, 532=1064, 531=1062, 530=1060, 529=1058, 528=1056, 527=1054, 526=1052, 525=1050, 524=1048, 523=1046, 522=1044, 521=1042, 520=1040, 519=1038, 518=1036, 517=1034, 516=1032, 515=1030, 514=1028, 513=1026, 512=1024, 511=1022, 510=1020, 509=1018, 508=1016, 507=1014, 506=1012, 505=1010, 504=1008, 503=1006, 502=1004, 501=1002, 500=1000, 499=998, 498=996, 497=994, 496=992, 495=990, 494=988, 493=986, 492=984, 491=982, 490=980, 489=978, 488=976, 487=974, 486=972, 485=970, 484=968, 483=966, 482=964, 481=962, 480=960, 479=958, 478=956, 477=954, 476=952, 475=950, 474=948, 473=946, 472=944, 471=942, 470=940, 469=938, 468=936, 467=934, 466=932, 465=930, 464=928, 463=926, 462=924, 461=922, 460=920, 459=918, 458=916, 457=914, 456=912, 455=910, 454=908, 453=906, 452=904, 451=902, 450=900, 449=898, 448=896, 447=894, 446=892, 445=890, 444=888, 443=886, 442=884, 441=882, 440=880, 439=878, 438=876, 437=874, 436=872, 435=870, 434=868, 433=866, 432=864, 431=862, 430=860, 429=858, 428=856, 427=854, 426=852, 425=850, 424=848, 423=846, 422=844, 421=842, 420=840, 419=838, 418=836, 417=834, 416=832, 415=830, 414=828, 413=826, 412=824, 411=822, 410=820, 409=818, 408=816, 407=814, 406=812, 405=810, 404=808, 403=806, 402=804, 401=802, 400=800, 399=798, 398=796, 397=794, 396=792, 395=790, 394=788, 393=786, 392=784, 391=782, 390=780, 389=778, 388=776, 387=774, 386=772, 385=770, 384=768, 383=766, 382=764, 381=762, 380=760, 379=758, 378=756, 377=754, 376=752, 375=750, 374=748, 373=746, 372=744, 371=742, 370=740, 369=738, 368=736, 367=734, 366=732, 365=730, 364=728, 363=726, 362=724, 361=722, 360=720, 359=718, 358=716, 357=714, 356=712, 355=710, 354=708, 353=706, 352=704, 351=702, 350=700, 349=698, 348=696, 347=694, 346=692, 345=690, 344=688, 343=686, 342=684, 341=682, 340=680, 339=678, 338=676, 337=674, 336=672, 335=670, 334=668, 333=666, 332=664, 331=662, 330=660, 329=658, 328=656, 327=654, 326=652, 325=650, 324=648, 323=646, 322=644, 321=642, 320=640, 319=638, 318=636, 317=634, 316=632, 315=630, 314=628, 313=626, 312=624, 311=622, 310=620, 309=618, 308=616, 307=614, 306=612, 305=610, 304=608, 303=606, 302=604, 301=602, 300=600, 299=598, 298=596, 297=594, 296=592, 295=590, 294=588, 293=586, 292=584, 291=582, 290=580, 289=578, 288=576, 287=574, 286=572, 285=570, 284=568, 283=566, 282=564, 281=562, 280=560, 279=558, 278=556, 277=554, 276=552, 275=550, 274=548, 273=546, 272=544, 271=542, 270=540, 269=538, 268=536, 267=534, 266=532, 265=530, 264=528, 263=526, 262=524, 261=522, 260=520, 259=518, 258=516, 257=514, 256=512, 255=510, 254=508, 253=506, 252=504, 251=502, 250=500, 249=498, 248=496, 247=494, 246=492, 245=490, 244=488, 243=486, 242=484, 241=482, 240=480, 239=478, 238=476, 237=474, 236=472, 235=470, 234=468, 233=466, 232=464, 231=462, 230=460, 229=458, 228=456, 227=454, 226=452, 225=450, 224=448, 223=446, 222=444, 221=442, 220=440, 219=438, 218=436, 217=434, 216=432, 215=430, 214=428, 213=426, 212=424, 211=422, 210=420, 209=418, 208=416, 207=414, 206=412, 205=410, 204=408, 203=406, 202=404, 201=402, 200=400, 199=398, 198=396, 197=394, 196=392, 195=390, 194=388, 193=386, 192=384, 191=382, 190=380, 189=378, 188=376, 187=374, 186=372, 185=370, 184=368, 183=366, 182=364, 181=362, 180=360, 179=358, 178=356, 177=354, 176=352, 175=350, 174=348, 173=346, 172=344, 171=342, 170=340, 169=338, 168=336, 167=334, 166=332, 165=330, 164=328, 163=326, 162=324, 161=322, 160=320, 159=318, 158=316, 157=314, 156=312, 155=310, 154=308, 153=306, 152=304, 151=302, 150=300, 149=298, 148=296, 147=294, 146=292, 145=290, 144=288, 143=286, 142=284, 141=282, 140=280, 139=278, 138=276, 137=274, 136=272, 135=270, 134=268, 133=266, 132=264, 131=262, 130=260, 129=258, 128=256, 127=254, 126=252, 125=250, 124=248, 123=246, 122=244, 121=242, 120=240, 119=238, 118=236, 117=234, 116=232, 115=230, 114=228, 113=226, 112=224, 111=222, 110=220, 109=218, 108=216, 107=214, 106=212, 105=210, 104=208, 103=206, 102=204, 101=202, 100=200, 99=198, 98=196, 97=194, 96=192, 95=190, 94=188, 93=186, 92=184, 91=182, 90=180, 89=178, 88=176, 87=174, 86=172, 85=170, 84=168, 83=166, 82=164, 81=162, 80=160, 79=158, 78=156, 77=154, 76=152, 75=150, 74=148, 73=146, 72=144, 71=142, 70=140, 69=138, 68=136, 67=134, 66=132, 65=130, 64=128, 63=126, 62=124, 61=122, 60=120, 59=118, 58=116, 57=114, 56=112, 55=110, 54=108, 53=106, 52=104, 51=102, 50=100, 49=98, 48=96, 47=94, 46=92, 45=90, 44=88, 43=86, 42=84, 41=82, 40=80, 39=78, 38=76, 37=74, 36=72, 35=70, 34=68, 33=66, 32=64, 31=62, 30=60, 29=58, 28=56, 27=54, 26=52, 25=50, 24=48, 23=46, 22=44, 21=42, 20=40, 19=38, 18=36, 17=34, 16=32, 15=30, 14=28, 13=26, 12=24, 11=22, 10=20, 9=18, 8=16, 7=14, 6=12, 5=10, 4=8, 3=6, 2=4, 1=2, 0=0}

hashMapThreads <<< threads finished elapsedTime: 6483258 ns
hashMapThreads <<< hm.size: 2711
hashMapThreads <<<      hm: {35=70, 44=88, 46=92, 48=96, 49=98, 50=100, 51=102, 53=106, 55=110, 59=118, 61=122, 62=124, 63=126, 64=128, 67=134, 69=138, 72=144, 73=146, 75=150, 78=156, 79=158, 80=160, 81=162, 82=164, 83=166, 84=168, 85=170, 86=172, 88=176, 92=184, 94=188, 96=192, 98=196, 102=204, 106=212, 110=220, 113=226, 114=228, 115=230, 116=232, 119=238, 125=250, 128=256, 131=262, 133=266, 137=274, 143=286, 147=294, 153=306, 156=312, 157=314, 159=318, 163=326, 165=330, 167=334, 172=344, 174=348, 176=352, 177=354, 178=356, 179=358, 180=360, 181=362, 182=364, 184=368, 185=370, 187=374, 188=376, 192=384, 196=392, 197=394, 198=396, 199=398, 201=402, 205=410, 207=414, 209=418, 210=420, 212=424, 215=430, 216=432, 220=440, 221=442, 223=446, 224=448, 227=454, 229=458, 231=462, 232=464, 233=466, 234=468, 236=472, 237=474, 239=478, 241=482, 243=486, 245=490, 247=494, 249=498, 251=502, 253=506, 257=514, 261=522, 262=524, 263=526, 264=528, 266=532, 268=536, 270=540, 271=542, 273=546, 275=550, 279=558, 281=562, 283=566, 285=570, 287=574, 290=580, 292=584, 293=586, 295=590, 301=602, 305=610, 307=614, 311=622, 313=626, 315=630, 316=632, 317=634, 320=640, 321=642, 322=644, 324=648, 325=650, 326=652, 327=654, 328=656, 329=658, 330=660, 332=664, 333=666, 334=668, 336=672, 338=676, 339=678, 340=680, 341=682, 343=686, 345=690, 347=694, 348=696, 349=698, 350=700, 351=702, 352=704, 353=706, 354=708, 355=710, 356=712, 357=714, 358=716, 359=718, 360=720, 361=722, 362=724, 363=726, 364=728, 365=730, 366=732, 367=734, 368=736, 369=738, 370=740, 371=742, 372=744, 373=746, 374=748, 375=750, 376=752, 377=754, 378=756, 379=758, 380=760, 381=762, 382=764, 383=766, 384=768, 385=770, 386=772, 387=774, 388=776, 389=778, 390=780, 391=782, 392=784, 393=786, 394=788, 395=790, 396=792, 397=794, 398=796, 399=798, 400=800, 401=802, 402=804, 403=806, 404=808, 405=810, 406=812, 407=814, 408=816, 409=818, 410=820, 411=822, 412=824, 413=826, 414=828, 415=830, 416=832, 417=834, 418=836, 419=838, 420=840, 421=842, 422=844, 423=846, 424=848, 425=850, 426=852, 427=854, 428=856, 429=858, 430=860, 431=862, 432=864, 433=866, 434=868, 435=870, 436=872, 437=874, 438=876, 439=878, 440=880, 441=882, 442=884, 443=886, 444=888, 445=890, 446=892, 447=894, 448=896, 449=898, 450=900, 451=902, 452=904, 453=906, 454=908, 455=910, 456=912, 457=914, 458=916, 459=918, 460=920, 461=922, 462=924, 463=926, 464=928, 465=930, 466=932, 467=934, 468=936, 469=938, 470=940, 471=942, 472=944, 473=946, 474=948, 475=950, 476=952, 477=954, 478=956, 479=958, 480=960, 481=962, 482=964, 483=966, 484=968, 485=970, 486=972, 487=974, 488=976, 489=978, 490=980, 491=982, 492=984, 493=986, 494=988, 495=990, 496=992, 497=994, 498=996, 499=998, 500=1000, 501=1002, 502=1004, 503=1006, 504=1008, 505=1010, 506=1012, 507=1014, 508=1016, 509=1018, 510=1020, 511=1022, 512=1024, 513=1026, 514=1028, 515=1030, 516=1032, 517=1034, 518=1036, 519=1038, 520=1040, 521=1042, 522=1044, 523=1046, 524=1048, 525=1050, 526=1052, 527=1054, 528=1056, 529=1058, 530=1060, 531=1062, 532=1064, 533=1066, 534=1068, 535=1070, 536=1072, 537=1074, 538=1076, 539=1078, 540=1080, 541=1082, 542=1084, 543=1086, 544=1088, 545=1090, 546=1092, 547=1094, 548=1096, 549=1098, 550=1100, 551=1102, 552=1104, 553=1106, 554=1108, 555=1110, 556=1112, 557=1114, 558=1116, 559=1118, 560=1120, 561=1122, 562=1124, 563=1126, 564=1128, 565=1130, 566=1132, 567=1134, 568=1136, 569=1138, 570=1140, 571=1142, 572=1144, 573=1146, 574=1148, 575=1150, 576=1152, 577=1154, 578=1156, 579=1158, 580=1160, 581=1162, 582=1164, 583=1166, 584=1168, 585=1170, 586=1172, 587=1174, 588=1176, 589=1178, 590=1180, 591=1182, 592=1184, 593=1186, 594=1188, 595=1190, 596=1192, 597=1194, 598=1196, 599=1198, 600=1200, 601=1202, 602=1204, 603=1206, 604=1208, 605=1210, 606=1212, 607=1214, 608=1216, 609=1218, 610=1220, 611=1222, 612=1224, 613=1226, 614=1228, 615=1230, 616=1232, 617=1234, 618=1236, 619=1238, 620=1240, 621=1242, 622=1244, 623=1246, 624=1248, 625=1250, 626=1252, 627=1254, 628=1256, 629=1258, 630=1260, 631=1262, 632=1264, 633=1266, 634=1268, 635=1270, 636=1272, 637=1274, 638=1276, 639=1278, 640=1280, 641=1282, 642=1284, 643=1286, 644=1288, 645=1290, 646=1292, 647=1294, 648=1296, 649=1298, 650=1300, 651=1302, 652=1304, 653=1306, 654=1308, 655=1310, 656=1312, 657=1314, 658=1316, 659=1318, 660=1320, 661=1322, 662=1324, 663=1326, 664=1328, 665=1330, 666=1332, 667=1334, 668=1336, 669=1338, 670=1340, 671=1342, 672=1344, 673=1346, 674=1348, 675=1350, 676=1352, 677=1354, 678=1356, 679=1358, 680=1360, 681=1362, 682=1364, 683=1366, 684=1368, 685=1370, 686=1372, 687=1374, 688=1376, 689=1378, 690=1380, 691=1382, 692=1384, 693=1386, 694=1388, 695=1390, 696=1392, 697=1394, 698=1396, 699=1398, 700=1400, 701=1402, 702=1404, 703=1406, 704=1408, 705=1410, 706=1412, 707=1414, 708=1416, 709=1418, 710=1420, 711=1422, 712=1424, 713=1426, 714=1428, 715=1430, 716=1432, 717=1434, 718=1436, 719=1438, 720=1440, 721=1442, 722=1444, 723=1446, 724=1448, 725=1450, 726=1452, 727=1454, 728=1456, 729=1458, 730=1460, 731=1462, 732=1464, 733=1466, 734=1468, 735=1470, 736=1472, 737=1474, 738=1476, 739=1478, 740=1480, 741=1482, 742=1484, 743=1486, 744=1488, 745=1490, 746=1492, 747=1494, 748=1496, 749=1498, 750=1500, 751=1502, 752=1504, 753=1506, 754=1508, 755=1510, 756=1512, 757=1514, 758=1516, 759=1518, 760=1520, 761=1522, 762=1524, 763=1526, 764=1528, 765=1530, 766=1532, 767=1534, 768=1536, 769=1538, 770=1540, 771=1542, 772=1544, 773=1546, 774=1548, 775=1550, 776=1552, 777=1554, 778=1556, 779=1558, 780=1560, 781=1562, 782=1564, 783=1566, 784=1568, 785=1570, 786=1572, 787=1574, 788=1576, 789=1578, 790=1580, 791=1582, 792=1584, 793=1586, 794=1588, 795=1590, 796=1592, 797=1594, 798=1596, 799=1598, 800=1600, 801=1602, 802=1604, 803=1606, 804=1608, 805=1610, 806=1612, 807=1614, 808=1616, 809=1618, 810=1620, 811=1622, 812=1624, 813=1626, 814=1628, 815=1630, 816=1632, 817=1634, 818=1636, 819=1638, 820=1640, 821=1642, 822=1644, 823=1646, 824=1648, 825=1650, 826=1652, 827=1654, 828=1656, 829=1658, 830=1660, 831=1662, 832=1664, 833=1666, 834=1668, 835=1670, 836=1672, 837=1674, 838=1676, 839=1678, 840=1680, 841=1682, 842=1684, 843=1686, 844=1688, 845=1690, 846=1692, 847=1694, 848=1696, 849=1698, 850=1700, 851=1702, 852=1704, 853=1706, 854=1708, 855=1710, 856=1712, 857=1714, 858=1716, 859=1718, 860=1720, 861=1722, 862=1724, 863=1726, 864=1728, 865=1730, 866=1732, 867=1734, 868=1736, 869=1738, 870=1740, 871=1742, 872=1744, 873=1746, 874=1748, 875=1750, 876=1752, 877=1754, 878=1756, 879=1758, 880=1760, 881=1762, 882=1764, 883=1766, 884=1768, 885=1770, 886=1772, 887=1774, 888=1776, 889=1778, 890=1780, 891=1782, 892=1784, 893=1786, 894=1788, 895=1790, 896=1792, 897=1794, 898=1796, 899=1798, 900=1800, 901=1802, 902=1804, 903=1806, 904=1808, 905=1810, 906=1812, 907=1814, 908=1816, 909=1818, 910=1820, 911=1822, 912=1824, 913=1826, 914=1828, 915=1830, 916=1832, 917=1834, 918=1836, 919=1838, 920=1840, 921=1842, 922=1844, 923=1846, 924=1848, 925=1850, 926=1852, 927=1854, 928=1856, 929=1858, 930=1860, 931=1862, 932=1864, 933=1866, 934=1868, 935=1870, 936=1872, 937=1874, 938=1876, 939=1878, 940=1880, 941=1882, 942=1884, 943=1886, 944=1888, 945=1890, 946=1892, 947=1894, 948=1896, 949=1898, 950=1900, 951=1902, 952=1904, 953=1906, 954=1908, 955=1910, 956=1912, 957=1914, 958=1916, 959=1918, 960=1920, 961=1922, 962=1924, 963=1926, 964=1928, 965=1930, 966=1932, 967=1934, 968=1936, 969=1938, 970=1940, 971=1942, 972=1944, 973=1946, 974=1948, 975=1950, 976=1952, 977=1954, 978=1956, 979=1958, 980=1960, 981=1962, 982=1964, 983=1966, 984=1968, 985=1970, 986=1972, 987=1974, 988=1976, 989=1978, 990=1980, 991=1982, 992=1984, 993=1986, 994=1988, 995=1990, 996=1992, 997=1994, 998=1996, 999=1998, 1026=2052, 1031=2062, 1033=2066, 1035=2070, 1036=2072, 1039=2078, 1040=2080, 1041=2082, 1042=2084, 1043=2086, 1044=2088, 1045=2090, 1046=2092, 1048=2096, 1050=2100, 1052=2104, 1053=2106, 1054=2108, 1055=2110, 1056=2112, 1058=2116, 1059=2118, 1060=2120, 1062=2124, 1068=2136, 1070=2140, 1072=2144, 1073=2146, 1074=2148, 1075=2150, 1077=2154, 1079=2158, 1081=2162, 1083=2166, 1085=2170, 1086=2172, 1087=2174, 1088=2176, 1090=2180, 1091=2182, 1092=2184, 1093=2186, 1095=2190, 1096=2192, 1097=2194, 1099=2198, 1101=2202, 1102=2204, 1103=2206, 1104=2208, 1105=2210, 1106=2212, 1107=2214, 1108=2216, 1109=2218, 1110=2220, 1112=2224, 1116=2232, 1118=2236, 1120=2240, 1122=2244, 1124=2248, 1126=2252, 1128=2256, 1130=2260, 1132=2264, 1134=2268, 1136=2272, 1137=2274, 1138=2276, 1139=2278, 1140=2280, 1141=2282, 1143=2286, 1145=2290, 1147=2294, 1149=2298, 1151=2302, 1152=2304, 1153=2306, 1155=2310, 1157=2314, 1159=2318, 1161=2322, 1163=2326, 1165=2330, 1167=2334, 1169=2338, 1171=2342, 1173=2346, 1175=2350, 1177=2354, 1179=2358, 1180=2360, 1181=2362, 1183=2366, 1185=2370, 1187=2374, 1189=2378, 1191=2382, 1194=2388, 1196=2392, 1198=2396, 1200=2400, 1201=2402, 1202=2404, 1203=2406, 1204=2408, 1205=2410, 1206=2412, 1208=2416, 1209=2418, 1210=2420, 1211=2422, 1212=2424, 1214=2428, 1216=2432, 1218=2436, 1220=2440, 1221=2442, 1222=2444, 1223=2446, 1225=2450, 1227=2454, 1229=2458, 1231=2462, 1233=2466, 1234=2468, 1236=2472, 1238=2476, 1239=2478, 1240=2480, 1241=2482, 1242=2484, 1244=2488, 1245=2490, 1247=2494, 1248=2496, 1249=2498, 1253=2506, 1254=2508, 1255=2510, 1256=2512, 1257=2514, 1258=2516, 1259=2518, 1260=2520, 1261=2522, 1263=2526, 1265=2530, 1267=2534, 1269=2538, 1271=2542, 1273=2546, 1275=2550, 1277=2554, 1279=2558, 1281=2562, 1283=2566, 1285=2570, 1286=2572, 1287=2574, 1288=2576, 1290=2580, 1292=2584, 1294=2588, 1295=2590, 1297=2594, 1299=2598, 1301=2602, 1303=2606, 1305=2610, 1307=2614, 1309=2618, 1311=2622, 1313=2626, 1314=2628, 1315=2630, 1316=2632, 1317=2634, 1319=2638, 1321=2642, 1323=2646, 1325=2650, 1327=2654, 1329=2658, 1331=2662, 1333=2666, 1335=2670, 1337=2674, 1339=2678, 1340=2680, 1341=2682, 1343=2686, 1344=2688, 1345=2690, 1346=2692, 1347=2694, 1349=2698, 1350=2700, 1356=2712, 1357=2714, 1358=2716, 1359=2718, 1360=2720, 1361=2722, 1362=2724, 1387=2774, 1388=2776, 1389=2778, 1390=2780, 1391=2782, 1392=2784, 1393=2786, 1394=2788, 1395=2790, 1396=2792, 1397=2794, 1398=2796, 1399=2798, 1400=2800, 1401=2802, 1402=2804, 1403=2806, 1404=2808, 1405=2810, 1406=2812, 1407=2814, 1408=2816, 1409=2818, 1413=2826, 1414=2828, 1415=2830, 1416=2832, 1417=2834, 1418=2836, 1419=2838, 1420=2840, 1421=2842, 1422=2844, 1423=2846, 1424=2848, 1425=2850, 1426=2852, 1427=2854, 1428=2856, 1429=2858, 1430=2860, 1431=2862, 1432=2864, 1433=2866, 1434=2868, 1435=2870, 1436=2872, 1437=2874, 1438=2876, 1439=2878, 1440=2880, 1441=2882, 1442=2884, 1443=2886, 1444=2888, 1445=2890, 1446=2892, 1447=2894, 1448=2896, 1449=2898, 1450=2900, 1451=2902, 1452=2904, 1453=2906, 1454=2908, 1455=2910, 1456=2912, 1457=2914, 1458=2916, 1459=2918, 1460=2920, 1461=2922, 1462=2924, 1463=2926, 1464=2928, 1465=2930, 1466=2932, 1467=2934, 1468=2936, 1469=2938, 1470=2940, 1471=2942, 1472=2944, 1473=2946, 1474=2948, 1475=2950, 1476=2952, 1477=2954, 1478=2956, 1479=2958, 1480=2960, 1481=2962, 1482=2964, 1483=2966, 1484=2968, 1485=2970, 1486=2972, 1487=2974, 1488=2976, 1489=2978, 1490=2980, 1491=2982, 1492=2984, 1493=2986, 1494=2988, 1495=2990, 1496=2992, 1497=2994, 1498=2996, 1499=2998, 1500=3000, 1501=3002, 1502=3004, 1503=3006, 1504=3008, 1505=3010, 1506=3012, 1507=3014, 1508=3016, 1509=3018, 1510=3020, 1511=3022, 1512=3024, 1513=3026, 1514=3028, 1515=3030, 1516=3032, 1517=3034, 1518=3036, 1519=3038, 1520=3040, 1521=3042, 1522=3044, 1523=3046, 1524=3048, 1525=3050, 1526=3052, 1527=3054, 1528=3056, 1529=3058, 1530=3060, 1531=3062, 1532=3064, 1533=3066, 1534=3068, 1535=3070, 1536=3072, 1537=3074, 1538=3076, 1539=3078, 1540=3080, 1541=3082, 1542=3084, 1543=3086, 1544=3088, 1545=3090, 1546=3092, 1547=3094, 1548=3096, 1549=3098, 1550=3100, 1551=3102, 1552=3104, 1553=3106, 1554=3108, 1555=3110, 1556=3112, 1557=3114, 1558=3116, 1559=3118, 1560=3120, 1561=3122, 1562=3124, 1563=3126, 1564=3128, 1565=3130, 1566=3132, 1567=3134, 1568=3136, 1569=3138, 1570=3140, 1571=3142, 1572=3144, 1573=3146, 1574=3148, 1575=3150, 1576=3152, 1577=3154, 1578=3156, 1579=3158, 1580=3160, 1581=3162, 1582=3164, 1583=3166, 1584=3168, 1585=3170, 1586=3172, 1587=3174, 1588=3176, 1589=3178, 1590=3180, 1591=3182, 1592=3184, 1593=3186, 1594=3188, 1595=3190, 1596=3192, 1597=3194, 1598=3196, 1599=3198, 1600=3200, 1601=3202, 1602=3204, 1603=3206, 1604=3208, 1605=3210, 1606=3212, 1607=3214, 1608=3216, 1609=3218, 1610=3220, 1611=3222, 1612=3224, 1613=3226, 1614=3228, 1615=3230, 1616=3232, 1617=3234, 1618=3236, 1619=3238, 1620=3240, 1621=3242, 1622=3244, 1623=3246, 1624=3248, 1625=3250, 1626=3252, 1627=3254, 1628=3256, 1629=3258, 1630=3260, 1631=3262, 1632=3264, 1633=3266, 1634=3268, 1635=3270, 1636=3272, 1637=3274, 1638=3276, 1639=3278, 1640=3280, 1641=3282, 1642=3284, 1643=3286, 1644=3288, 1645=3290, 1646=3292, 1647=3294, 1648=3296, 1649=3298, 1650=3300, 1651=3302, 1652=3304, 1653=3306, 1654=3308, 1655=3310, 1656=3312, 1657=3314, 1658=3316, 1659=3318, 1660=3320, 1661=3322, 1662=3324, 1663=3326, 1664=3328, 1665=3330, 1666=3332, 1667=3334, 1668=3336, 1669=3338, 1670=3340, 1671=3342, 1672=3344, 1673=3346, 1674=3348, 1675=3350, 1676=3352, 1677=3354, 1678=3356, 1679=3358, 1680=3360, 1681=3362, 1682=3364, 1683=3366, 1684=3368, 1685=3370, 1686=3372, 1687=3374, 1688=3376, 1689=3378, 1690=3380, 1691=3382, 1692=3384, 1693=3386, 1694=3388, 1695=3390, 1696=3392, 1697=3394, 1698=3396, 1699=3398, 1700=3400, 1701=3402, 1702=3404, 1703=3406, 1704=3408, 1705=3410, 1706=3412, 1707=3414, 1708=3416, 1709=3418, 1710=3420, 1711=3422, 1712=3424, 1713=3426, 1714=3428, 1715=3430, 1716=3432, 1717=3434, 1718=3436, 1719=3438, 1720=3440, 1721=3442, 1722=3444, 1723=3446, 1724=3448, 1725=3450, 1726=3452, 1727=3454, 1728=3456, 1729=3458, 1730=3460, 1731=3462, 1732=3464, 1733=3466, 1734=3468, 1735=3470, 1736=3472, 1737=3474, 1738=3476, 1739=3478, 1740=3480, 1741=3482, 1742=3484, 1743=3486, 1744=3488, 1745=3490, 1746=3492, 1747=3494, 1748=3496, 1749=3498, 1750=3500, 1751=3502, 1752=3504, 1753=3506, 1754=3508, 1755=3510, 1756=3512, 1757=3514, 1758=3516, 1759=3518, 1760=3520, 1761=3522, 1762=3524, 1763=3526, 1764=3528, 1765=3530, 1766=3532, 1767=3534, 1768=3536, 1769=3538, 1770=3540, 1771=3542, 1772=3544, 1773=3546, 1774=3548, 1775=3550, 1776=3552, 1777=3554, 1778=3556, 1779=3558, 1780=3560, 1781=3562, 1782=3564, 1783=3566, 1784=3568, 1785=3570, 1786=3572, 1787=3574, 1788=3576, 1789=3578, 1790=3580, 1791=3582, 1792=3584, 1793=3586, 1794=3588, 1795=3590, 1796=3592, 1797=3594, 1798=3596, 1799=3598, 1800=3600, 1801=3602, 1802=3604, 1803=3606, 1804=3608, 1805=3610, 1806=3612, 1807=3614, 1808=3616, 1809=3618, 1810=3620, 1811=3622, 1812=3624, 1813=3626, 1814=3628, 1815=3630, 1816=3632, 1817=3634, 1818=3636, 1819=3638, 1820=3640, 1821=3642, 1822=3644, 1823=3646, 1824=3648, 1825=3650, 1826=3652, 1827=3654, 1828=3656, 1829=3658, 1830=3660, 1831=3662, 1832=3664, 1833=3666, 1834=3668, 1835=3670, 1836=3672, 1837=3674, 1838=3676, 1839=3678, 1840=3680, 1841=3682, 1842=3684, 1843=3686, 1844=3688, 1845=3690, 1846=3692, 1847=3694, 1848=3696, 1849=3698, 1850=3700, 1851=3702, 1852=3704, 1853=3706, 1854=3708, 1855=3710, 1856=3712, 1857=3714, 1858=3716, 1859=3718, 1860=3720, 1861=3722, 1862=3724, 1863=3726, 1864=3728, 1865=3730, 1866=3732, 1867=3734, 1868=3736, 1869=3738, 1870=3740, 1871=3742, 1872=3744, 1873=3746, 1874=3748, 1875=3750, 1876=3752, 1877=3754, 1878=3756, 1879=3758, 1880=3760, 1881=3762, 1882=3764, 1883=3766, 1884=3768, 1885=3770, 1886=3772, 1887=3774, 1888=3776, 1889=3778, 1890=3780, 1891=3782, 1892=3784, 1893=3786, 1894=3788, 1895=3790, 1896=3792, 1897=3794, 1898=3796, 1899=3798, 1900=3800, 1901=3802, 1902=3804, 1903=3806, 1904=3808, 1905=3810, 1906=3812, 1907=3814, 1908=3816, 1909=3818, 1910=3820, 1911=3822, 1912=3824, 1913=3826, 1914=3828, 1915=3830, 1916=3832, 1917=3834, 1918=3836, 1919=3838, 1920=3840, 1921=3842, 1922=3844, 1923=3846, 1924=3848, 1925=3850, 1926=3852, 1927=3854, 1928=3856, 1929=3858, 1930=3860, 1931=3862, 1932=3864, 1933=3866, 1934=3868, 1935=3870, 1936=3872, 1937=3874, 1938=3876, 1939=3878, 1940=3880, 1941=3882, 1942=3884, 1943=3886, 1944=3888, 1945=3890, 1946=3892, 1947=3894, 1948=3896, 1949=3898, 1950=3900, 1951=3902, 1952=3904, 1953=3906, 1954=3908, 1955=3910, 1956=3912, 1957=3914, 1958=3916, 1959=3918, 1960=3920, 1961=3922, 1962=3924, 1963=3926, 1964=3928, 1965=3930, 1966=3932, 1967=3934, 1968=3936, 1969=3938, 1970=3940, 1971=3942, 1972=3944, 1973=3946, 1974=3948, 1975=3950, 1976=3952, 1977=3954, 1978=3956, 1979=3958, 1980=3960, 1981=3962, 1982=3964, 1983=3966, 1984=3968, 1985=3970, 1986=3972, 1987=3974, 1988=3976, 1989=3978, 1990=3980, 1991=3982, 1992=3984, 1993=3986, 1994=3988, 1995=3990, 1996=3992, 1997=3994, 1998=3996, 1999=3998, 2083=4166, 2087=4174, 2088=4176, 2089=4178, 2091=4182, 2092=4184, 2093=4186, 2094=4188, 2095=4190, 2096=4192, 2097=4194, 2098=4196, 2099=4198, 2100=4200, 2101=4202, 2102=4204, 2103=4206, 2106=4212, 2107=4214, 2108=4216, 2109=4218, 2110=4220, 2111=4222, 2112=4224, 2115=4230, 2117=4234, 2120=4240, 2121=4242, 2123=4246, 2126=4252, 2127=4254, 2128=4256, 2129=4258, 2130=4260, 2131=4262, 2132=4264, 2133=4266, 2134=4268, 2135=4270, 2136=4272, 2137=4274, 2138=4276, 2139=4278, 2140=4280, 2142=4284, 2143=4286, 2144=4288, 2149=4298, 2150=4300, 2153=4306, 2154=4308, 2157=4314, 2158=4316, 2162=4324, 2163=4326, 2164=4328, 2166=4332, 2167=4334, 2170=4340, 2172=4344, 2173=4346, 2176=4352, 2178=4356, 2179=4358, 2180=4360, 2181=4362, 2184=4368, 2185=4370, 2188=4376, 2190=4380, 2191=4382, 2194=4388, 2195=4390, 2198=4396, 2200=4400, 2201=4402, 2204=4408, 2205=4410, 2206=4412, 2207=4414, 2210=4420, 2211=4422, 2213=4426, 2214=4428, 2215=4430, 2219=4438, 2220=4440, 2221=4442, 2222=4444, 2223=4446, 2224=4448, 2225=4450, 2226=4452, 2227=4454, 2228=4456, 2229=4458, 2230=4460, 2231=4462, 2232=4464, 2233=4466, 2235=4470, 2236=4472, 2239=4478, 2240=4480, 2243=4486, 2244=4488, 2245=4490, 2246=4492, 2247=4494, 2252=4504, 2253=4506, 2254=4508, 2255=4510, 2257=4514, 2258=4516, 2260=4520, 2263=4526, 2264=4528, 2267=4534, 2268=4536, 2269=4538, 2270=4540, 2271=4542, 2272=4544, 2274=4548, 2277=4554, 2279=4558, 2280=4560, 2281=4562, 2282=4564, 2284=4568, 2285=4570, 2286=4572, 2287=4574, 2288=4576, 2289=4578, 2290=4580, 2291=4582, 2292=4584, 2293=4586, 2294=4588, 2295=4590, 2296=4592, 2297=4594, 2298=4596, 2299=4598, 2300=4600, 2301=4602, 2304=4608, 2305=4610, 2308=4616, 2309=4618, 2310=4620, 2311=4622, 2312=4624, 2314=4628, 2318=4636, 2319=4638, 2320=4640, 2321=4642, 2322=4644, 2323=4646, 2326=4652, 2327=4654, 2329=4658, 2331=4662, 2332=4664, 2333=4666, 2334=4668, 2335=4670, 2338=4676, 2340=4680, 2341=4682, 2342=4684, 2343=4686, 2349=4698, 2352=4704, 2353=4706, 2354=4708, 2355=4710, 2358=4716, 2359=4718, 2360=4720, 2361=4722, 2362=4724, 2363=4726, 2364=4728, 2365=4730, 2368=4736, 2369=4738, 2370=4740, 2372=4744, 2373=4746, 2374=4748, 2375=4750, 2376=4752, 2377=4754, 2378=4756, 2380=4760, 2381=4762, 2382=4764, 2384=4768, 2386=4772, 2387=4774, 2388=4776, 2389=4778, 2391=4782, 2393=4786, 2395=4790, 2396=4792, 2397=4794, 2398=4796, 2399=4798, 2400=4800, 2401=4802, 2402=4804, 2403=4806, 2404=4808, 2405=4810, 2406=4812, 2407=4814, 2408=4816, 2409=4818, 2410=4820, 2411=4822, 2412=4824, 2413=4826, 2414=4828, 2415=4830, 2416=4832, 2417=4834, 2418=4836, 2419=4838, 2420=4840, 2421=4842, 2422=4844, 2423=4846, 2424=4848, 2425=4850, 2426=4852, 2427=4854, 2428=4856, 2429=4858, 2430=4860, 2431=4862, 2432=4864, 2433=4866, 2434=4868, 2435=4870, 2436=4872, 2437=4874, 2438=4876, 2439=4878, 2440=4880, 2441=4882, 2442=4884, 2443=4886, 2444=4888, 2445=4890, 2446=4892, 2447=4894, 2448=4896, 2449=4898, 2450=4900, 2451=4902, 2452=4904, 2453=4906, 2454=4908, 2455=4910, 2456=4912, 2457=4914, 2458=4916, 2459=4918, 2460=4920, 2461=4922, 2462=4924, 2463=4926, 2464=4928, 2465=4930, 2466=4932, 2467=4934, 2468=4936, 2469=4938, 2470=4940, 2471=4942, 2472=4944, 2473=4946, 2474=4948, 2475=4950, 2476=4952, 2477=4954, 2478=4956, 2479=4958, 2480=4960, 2481=4962, 2482=4964, 2483=4966, 2484=4968, 2485=4970, 2486=4972, 2487=4974, 2488=4976, 2489=4978, 2490=4980, 2491=4982, 2492=4984, 2493=4986, 2494=4988, 2495=4990, 2496=4992, 2497=4994, 2498=4996, 2499=4998, 2500=5000, 2501=5002, 2502=5004, 2503=5006, 2504=5008, 2505=5010, 2506=5012, 2507=5014, 2508=5016, 2509=5018, 2510=5020, 2511=5022, 2512=5024, 2513=5026, 2514=5028, 2515=5030, 2516=5032, 2517=5034, 2518=5036, 2519=5038, 2520=5040, 2521=5042, 2522=5044, 2523=5046, 2524=5048, 2525=5050, 2526=5052, 2527=5054, 2528=5056, 2529=5058, 2530=5060, 2531=5062, 2532=5064, 2533=5066, 2534=5068, 2535=5070, 2536=5072, 2537=5074, 2538=5076, 2539=5078, 2540=5080, 2541=5082, 2542=5084, 2543=5086, 2544=5088, 2545=5090, 2546=5092, 2547=5094, 2548=5096, 2549=5098, 2550=5100, 2551=5102, 2552=5104, 2553=5106, 2554=5108, 2555=5110, 2556=5112, 2557=5114, 2558=5116, 2559=5118, 2560=5120, 2561=5122, 2562=5124, 2563=5126, 2564=5128, 2565=5130, 2566=5132, 2567=5134, 2568=5136, 2569=5138, 2570=5140, 2571=5142, 2572=5144, 2573=5146, 2574=5148, 2575=5150, 2576=5152, 2577=5154, 2578=5156, 2579=5158, 2580=5160, 2581=5162, 2582=5164, 2583=5166, 2584=5168, 2585=5170, 2586=5172, 2587=5174, 2588=5176, 2589=5178, 2590=5180, 2591=5182, 2592=5184, 2593=5186, 2594=5188, 2595=5190, 2596=5192, 2597=5194, 2598=5196, 2599=5198, 2600=5200, 2601=5202, 2602=5204, 2603=5206, 2604=5208, 2605=5210, 2606=5212, 2607=5214, 2608=5216, 2609=5218, 2610=5220, 2611=5222, 2612=5224, 2613=5226, 2614=5228, 2615=5230, 2616=5232, 2617=5234, 2618=5236, 2619=5238, 2620=5240, 2621=5242, 2622=5244, 2623=5246, 2624=5248, 2625=5250, 2626=5252, 2627=5254, 2628=5256, 2629=5258, 2630=5260, 2631=5262, 2632=5264, 2633=5266, 2634=5268, 2635=5270, 2636=5272, 2637=5274, 2638=5276, 2639=5278, 2640=5280, 2641=5282, 2642=5284, 2643=5286, 2644=5288, 2645=5290, 2646=5292, 2647=5294, 2648=5296, 2649=5298, 2650=5300, 2651=5302, 2652=5304, 2653=5306, 2654=5308, 2655=5310, 2656=5312, 2657=5314, 2658=5316, 2659=5318, 2660=5320, 2661=5322, 2662=5324, 2663=5326, 2664=5328, 2665=5330, 2666=5332, 2667=5334, 2668=5336, 2669=5338, 2670=5340, 2671=5342, 2672=5344, 2673=5346, 2674=5348, 2675=5350, 2676=5352, 2677=5354, 2678=5356, 2679=5358, 2680=5360, 2681=5362, 2682=5364, 2683=5366, 2684=5368, 2685=5370, 2686=5372, 2687=5374, 2688=5376, 2689=5378, 2690=5380, 2691=5382, 2692=5384, 2693=5386, 2694=5388, 2695=5390, 2696=5392, 2697=5394, 2698=5396, 2699=5398, 2700=5400, 2701=5402, 2702=5404, 2703=5406, 2704=5408, 2705=5410, 2706=5412, 2707=5414, 2708=5416, 2709=5418, 2710=5420, 2711=5422, 2712=5424, 2713=5426, 2714=5428, 2715=5430, 2716=5432, 2717=5434, 2718=5436, 2719=5438, 2720=5440, 2721=5442, 2722=5444, 2723=5446, 2724=5448, 2725=5450, 2726=5452, 2727=5454, 2728=5456, 2729=5458, 2730=5460, 2731=5462, 2732=5464, 2733=5466, 2734=5468, 2735=5470, 2736=5472, 2737=5474, 2738=5476, 2739=5478, 2740=5480, 2741=5482, 2742=5484, 2743=5486, 2744=5488, 2745=5490, 2746=5492, 2747=5494, 2748=5496, 2749=5498, 2750=5500, 2751=5502, 2752=5504, 2753=5506, 2754=5508, 2755=5510, 2756=5512, 2757=5514, 2758=5516, 2759=5518, 2760=5520, 2761=5522, 2762=5524, 2763=5526, 2764=5528, 2765=5530, 2766=5532, 2767=5534, 2768=5536, 2769=5538, 2770=5540, 2771=5542, 2772=5544, 2773=5546, 2774=5548, 2775=5550, 2776=5552, 2777=5554, 2778=5556, 2779=5558, 2780=5560, 2781=5562, 2782=5564, 2783=5566, 2784=5568, 2785=5570, 2786=5572, 2787=5574, 2788=5576, 2789=5578, 2790=5580, 2791=5582, 2792=5584, 2793=5586, 2794=5588, 2795=5590, 2796=5592, 2797=5594, 2798=5596, 2799=5598, 2800=5600, 2801=5602, 2802=5604, 2803=5606, 2804=5608, 2805=5610, 2806=5612, 2807=5614, 2808=5616, 2809=5618, 2810=5620, 2811=5622, 2812=5624, 2813=5626, 2814=5628, 2815=5630, 2816=5632, 2817=5634, 2818=5636, 2819=5638, 2820=5640, 2821=5642, 2822=5644, 2823=5646, 2824=5648, 2825=5650, 2826=5652, 2827=5654, 2828=5656, 2829=5658, 2830=5660, 2831=5662, 2832=5664, 2833=5666, 2834=5668, 2835=5670, 2836=5672, 2837=5674, 2838=5676, 2839=5678, 2840=5680, 2841=5682, 2842=5684, 2843=5686, 2844=5688, 2845=5690, 2846=5692, 2847=5694, 2848=5696, 2849=5698, 2850=5700, 2851=5702, 2852=5704, 2853=5706, 2854=5708, 2855=5710, 2856=5712, 2857=5714, 2858=5716, 2859=5718, 2860=5720, 2861=5722, 2862=5724, 2863=5726, 2864=5728, 2865=5730, 2866=5732, 2867=5734, 2868=5736, 2869=5738, 2870=5740, 2871=5742, 2872=5744, 2873=5746, 2874=5748, 2875=5750, 2876=5752, 2877=5754, 2878=5756, 2879=5758, 2880=5760, 2881=5762, 2882=5764, 2883=5766, 2884=5768, 2885=5770, 2886=5772, 2887=5774, 2888=5776, 2889=5778, 2890=5780, 2891=5782, 2892=5784, 2893=5786, 2894=5788, 2895=5790, 2896=5792, 2897=5794, 2898=5796, 2899=5798, 2900=5800, 2901=5802, 2902=5804, 2903=5806, 2904=5808, 2905=5810, 2906=5812, 2907=5814, 2908=5816, 2909=5818, 2910=5820, 2911=5822, 2912=5824, 2913=5826, 2914=5828, 2915=5830, 2916=5832, 2917=5834, 2918=5836, 2919=5838, 2920=5840, 2921=5842, 2922=5844, 2923=5846, 2924=5848, 2925=5850, 2926=5852, 2927=5854, 2928=5856, 2929=5858, 2930=5860, 2931=5862, 2932=5864, 2933=5866, 2934=5868, 2935=5870, 2936=5872, 2937=5874, 2938=5876, 2939=5878, 2940=5880, 2941=5882, 2942=5884, 2943=5886, 2944=5888, 2945=5890, 2946=5892, 2947=5894, 2948=5896, 2949=5898, 2950=5900, 2951=5902, 2952=5904, 2953=5906, 2954=5908, 2955=5910, 2956=5912, 2957=5914, 2958=5916, 2959=5918, 2960=5920, 2961=5922, 2962=5924, 2963=5926, 2964=5928, 2965=5930, 2966=5932, 2967=5934, 2968=5936, 2969=5938, 2970=5940, 2971=5942, 2972=5944, 2973=5946, 2974=5948, 2975=5950, 2976=5952, 2977=5954, 2978=5956, 2979=5958, 2980=5960, 2981=5962, 2982=5964, 2983=5966, 2984=5968, 2985=5970, 2986=5972, 2987=5974, 2988=5976, 2989=5978, 2990=5980, 2991=5982, 2992=5984, 2993=5986, 2994=5988, 2995=5990, 2996=5992, 2997=5994, 2998=5996, 2999=5998}

main <<< all done!!!

When inserting objects with null values (key or value) into the Hashtable we get an exception.

The same does not hold true when inserting similar values into a HashMap object.

We then have output for the threads using the Hashtable class. We insert 3,000 values and it seems we always get 3,000 values. The object is thread safe so it should take a little longer to run that its counterpart the HashMap.

Finally we repeat the same operations using a HashMap object. As you can see in the output, we only stored 2,711 key value pairs. The difference was lost due to the fact that we did not use a synchronization mechanism such as a mutex of semaphore. I was going to add such mechanism, but decided to leave it as an exercise if you are interested.

The code for the HashTableThread class follows:

package canessa.hashmaptable;

import java.util.Hashtable;
import java.util.concurrent.*;

/*
 * 
 */
public class HashTableThread implements Runnable {

	// **** members ****
	Hashtable<Integer, Integer>	ht;
	int 						begin;
	int 						end;
	CountDownLatch 				latch;
	
	// **** constructor ****
	public HashTableThread(Hashtable<Integer, Integer> ht, int begin, int end, CountDownLatch latch) {
		this.ht 	= ht;
		this.begin	= begin;
		this.end	= end;
		this.latch 	= latch;
	}

	// **** ****
	@Override
	public void run() {
		
		// **** do some work ****
		for (int i = begin; i < end; i++) {
			ht.put(i, i * 2);
		}
		
		// **** flag that this thread is done ****
		latch.countDown();
	}
	
}

The code for the HashMapThread class follows:

package canessa.hashmaptable;

import java.util.HashMap;
import java.util.concurrent.*;


/*
 * 
 */
public class HashMapThread implements Runnable {

	// **** members ****
	HashMap<Integer, Integer>	hm;
	int 						begin;
	int 						end;
	CountDownLatch 				latch;	
	
	// **** constructor ****
	public HashMapThread(HashMap<Integer, Integer> hm, int begin, int end, CountDownLatch latch) {
		this.hm 	= hm;
		this.begin	= begin;
		this.end	= end;
		this.latch 	= latch;
	}
	
	// **** ****
	@Override
	public void run() {
		
		// **** do some work ****
		for (int i = begin; i < end; i++) {
			hm.put(i, i * 2);
		}
		
		// **** flag that this thread is done ****
		latch.countDown();
	}

}

To be honest with you, I have been working with Java for at least one decade and have never felt the need to use a Hashtable object. As you can see the difference in performance is not that great and today most applications and services are multi threaded so you will have to implement a synchronization mechanism which is already part of the HashMap class. In addition if you have null values you will have to provide a mechanism to deal with them.

If you are interested in experimenting with this code, I have placed it in my GitHub repository.

If you have comments or questions regarding this or any other post in this blog, or if you would like me to help with any phase in the SDLC (Software Development Life Cycle) of a product or service, please do not hesitate and leave me a note below. Requests for help will remain private.

Keep on reading and experimenting. It is the best way to learn and refresh your knowledge!

John

Follow me on Twitter:  @john_canessa

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.