摘要: 转载请注明出处:http://cantellow.iteye.com/blog/838473单例模式有以下特点: 1、单例类只能有一个实例。 2、单例类必须自己创建自己的唯一实例。 3、单例类必须给所有其他对象提供这一实例。第一种(懒汉,线程不安全):public class Singleto... 阅读全文
posted @ 2016-01-18 23:52 爆炸吧!现充\(#*_*)/ 阅读(146) 评论(0) 推荐(0) 编辑
摘要: package lianxi;import java.util.Scanner;public class WenDu { public double getHuaSD(double sheSD) { double huaSD = 1.8 * sheSD + 32; ... 阅读全文
posted @ 2016-01-17 19:37 爆炸吧!现充\(#*_*)/ 阅读(120) 评论(0) 推荐(0) 编辑
摘要: public class shu { private String shuming;//书名 private String leixing;//类型 private String zuozhe;//作者 private String jiage;//价... 阅读全文
posted @ 2016-01-16 00:11 爆炸吧!现充\(#*_*)/ 阅读(150) 评论(0) 推荐(0) 编辑
摘要: String c = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789"; Random d = new Random(); int d1 = d.nextInt... 阅读全文
posted @ 2016-01-14 21:36 爆炸吧!现充\(#*_*)/ 阅读(114) 评论(0) 推荐(1) 编辑
摘要: String d = "mingrikejijavabu"; int e = 0; for(int f = 0;f <d.length();f++) { String g = d.substring(f,f+1); ... 阅读全文
posted @ 2016-01-13 20:30 爆炸吧!现充\(#*_*)/ 阅读(130) 评论(0) 推荐(0) 编辑
摘要: int arr[][] = {{1,2,3},{4,5,6},{7,8,9}}; System.out.println("转置前的矩阵是:"); printArray(arr); int arr2[][] = ... 阅读全文
posted @ 2016-01-10 17:37 爆炸吧!现充\(#*_*)/ 阅读(243) 评论(0) 推荐(0) 编辑
摘要: int[] arr = {6789,573525,63190,615175,1332,109}; int a =arr[0]; for(int c =0; c < arr.length;c ++) { S... 阅读全文
posted @ 2016-01-08 18:50 爆炸吧!现充\(#*_*)/ 阅读(102) 评论(0) 推荐(0) 编辑
摘要: for(int F = 9;F >=1 ;F--) { for(int iF =0;iFF;iE--) { System.out.print("o"); } for(int nF = 9;nF>=F;nF--) { System.out.print(... 阅读全文
posted @ 2016-01-07 15:20 爆炸吧!现充\(#*_*)/ 阅读(141) 评论(0) 推荐(0) 编辑
摘要: 百文百鸡 for(int G = 0;G <= 100;G++)//公鸡数目 { for(int M = 0;M <= 100; M++)//母鸡数目 { for(int C =0;C <= 100; C++)//雏鸡数目 { if (G * 5 + M *... 阅读全文
posted @ 2016-01-06 21:45 爆炸吧!现充\(#*_*)/ 阅读(132) 评论(0) 推荐(0) 编辑
摘要: public class A03 { public static void main(String[] args) { // TODO 自动生成的方法存根 int n = 31;//n=年龄 if(n <=3) System.out.println("三岁不到的小孩会玩电脑?你忽悠鬼呢... 阅读全文
posted @ 2016-01-04 19:16 爆炸吧!现充\(#*_*)/ 阅读(313) 评论(0) 推荐(0) 编辑