- 博客(7)
- 收藏
- 关注
原创 Android取得屏幕分辨率
WindowManager windowManager = getWindowManager();Display display = windowManager.getDefaultDisplay();int Width = display.getWidth(); int Higth = display.getHeight();
2010-05-31 10:32:20 97
原创 生产者与消费者例子(多线程wait()与notifyAll应用)
package test;import java.util.concurrent.ExecutorService;import java.util.concurrent.Executors;import java.util.concurrent.TimeUnit;class Meal { private final int orderNum; public Me...
2010-05-25 16:42:22 100
原创 synchronized块及方法应用
package test;class Obj implements Runnable { public void fun1() { synchronized (this) { System.out.println(Thread.currentThread().getName() + "取得锁"); try { System.out.println("fu...
2010-05-24 16:02:02 73
原创 run()外部捕获run()内未捕获的异常
package test;import java.util.concurrent.ExecutorService;import java.util.concurrent.Executors;import java.util.concurrent.ThreadFactory;class ExcetptionThread2 implements Runnable{ @O...
2010-05-24 11:25:38 210
原创 java注解简单应用
package test;import java.lang.annotation.ElementType;import java.lang.annotation.Retention;import java.lang.annotation.RetentionPolicy;import java.lang.annotation.Target;@Target(ElementT...
2010-05-21 13:38:10 88
原创 enum版本石头剪刀布
package test;public enum Outcome{WIN,LOSE,DRAW}--------------------------------------package test;import java.util.Random;import static test.Outcome.*;interface Item { Outcom...
2010-05-20 15:24:31 114
Eclipse+CDT+MinGW+gdb安裝手冊
Eclipse除了可以开发Java之外,还可以支持很多语言,当然不会漏掉 C/C++,现在就来看看如何利用 Eclipse 进行C/C++开发。要使用 Eclipse开发c/c++ 最主要的几个步骤:1. 安装 JDK下载JDK,地址就不给了。2. 安装 Eclipse下载地址集成了C++的eclipse:http://www.eclipse.org/downloads/download...
2010-05-01 10:28:00 122
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人