打印小片断,免得写System.out.println()



	private static void p(Object o) {
		System.out.println(o);
	}

	
	private static void p(int o) {
		System.out.println(o);
	}
	
	private static void p(long o) {
		System.out.println(o);
	}
	
	private static void p(boolean o) {
		System.out.println(o);
	}
	
	
	private static void pc(java.util.Collection c) {
		java.util.Iterator it = c.iterator();
		while (it.hasNext()) {
			p(it.next());
		}
	}


	private static void pa(Object[] c) {
		if (c == null) {
			p(null);
			return;
		}
		
		pc(Arrays.asList(c));
	}

Leave a Comment

Your email address will not be published.

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