码迷,mamicode.com
首页 >  
搜索关键字:static synchronized    ( 48162个结果
static::、self::、new self()、new static()
static::、self::、new self()、new static() <?php class Father{ protected static $name = "大头"; public static function father_self(){ echo self::$name."\n" ...
分类:其他好文   时间:2021-05-24 14:21:29    阅读次数:0
设计模式-抽象工厂模式
抽象工厂模式,定义工厂接口,生产某一种类型的配件全部由某一家工厂所提供,解决不同工厂的兼容性问题。 /** * 抽象工厂模式 */ public class AbstratFactoryMethod { public static void main(String[] args) { } } //数 ...
分类:其他好文   时间:2021-05-24 14:18:18    阅读次数:0
[设计模式]3.1简单工厂模式
一、卖票案例 //测试 public class CilentTest { public static void main(String arg[]){ Customer p1=new Children(); System.out.println(p1.calculate(100.00)); Cus ...
分类:其他好文   时间:2021-05-24 14:17:47    阅读次数:0
获取天气信息,解决乱码问题
public class WeatherUtil { private static final Logger LOGGER = LoggerFactory.getLogger(WeatherUtil.class); public static String doGet(String path){ S ...
分类:其他好文   时间:2021-05-24 14:15:35    阅读次数:0
算法学习:给定一个序列求最大子序列的和
题目 给定一个序列,给出最大子序列的和。 解答 public class maxSubSum { public static int maxSubSum1(int [] a){ int maxSum = 0; for (int i = 0; i < a.length; i++) { for(int ...
分类:编程语言   时间:2021-05-24 14:09:52    阅读次数:0
Helloworld
Hello,world Java代码: public class Hello{ public static void main(String[] args){ System.out.print("Hello,world!"); }} 编译: javac Hello.java //编译生成class文 ...
分类:其他好文   时间:2021-05-24 14:06:34    阅读次数:0
php单列设计模型
<?php class One{ private static $_one; private function __construct(){} private function __clone(){} public static function getOne(){ if(!self::$_one ...
分类:Web程序   时间:2021-05-24 13:36:59    阅读次数:0
CountDownLatch
countDownLatch这个类使一个线程等待其他线程各自执行完毕后再执行。 public class CountDownLatchDemo { public static void main(String[] args) throws InterruptedException{ /** * * ...
分类:其他好文   时间:2021-05-24 13:31:31    阅读次数:0
两阶段终止模式volatile版本
public class Test { public static void main(String[] args) throws InterruptedException { TwoPhaseTermination tpt = new TwoPhaseTermination(); tpt.star ...
分类:其他好文   时间:2021-05-24 13:06:08    阅读次数:0
东西南北中布局
package cn.rushangw.lesson01;import java.awt.*;public class TestBorderLayout { public static void main(String[] args) { Frame frame = new Frame("TestB ...
分类:其他好文   时间:2021-05-24 13:01:24    阅读次数:0
48162条   上一页 1 ... 22 23 24 25 26 ... 4817 下一页
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!