复制代码
- //:P.java
- //TheP.rint&P.rintlnshorthand
- packagecom.bruceeckel.tools;
- publicclassP{
- publicstaticvoidrint(Objectobj){
- System.out.print(obj);
- }
- publicstaticvoidrint(Strings){
- System.out.print(s);
- }
- publicstaticvoidrint(char[]s){
- System.out.print(s);
- }
- publicstaticvoidrint(charc){
- System.out.print(c);
- }
- publicstaticvoidrint(inti){
- System.out.print(i);
- }
- publicstaticvoidrint(longl){
- System.out.print(l);
- }
- publicstaticvoidrint(floatf){
- System.out.print(f);
- }
- publicstaticvoidrint(doubled){
- System.out.print(d);
- }
- publicstaticvoidrint(booleanb){
- System.out.print(b);
- }
- publicstaticvoidrintln(){
- System.out.println();
- }
- publicstaticvoidrintln(Objectobj){
- System.out.println(obj);
- }
- publicstaticvoidrintln(Strings){
- System.out.println(s);
- }
- publicstaticvoidrintln(char[]s){
- System.out.println(s);
- }
- publicstaticvoidrintln(charc){
- System.out.println(c);
- }
- publicstaticvoidrintln(inti){
- System.out.println(i);
- }
- publicstaticvoidrintln(longl){
- System.out.println(l);
- }
- publicstaticvoidrintln(floatf){
- System.out.println(f);
- }
- publicstaticvoidrintln(doubled){
- System.out.println(d);
- }
- publicstaticvoidrintln(booleanb){
- System.out.println(b);
- }
- }///:~
欢迎光临 仓酷云 (http://ckuyun.com/) | Powered by Discuz! X3.2 |