
Java
桂成林
这个作者很懒,什么都没留下…
展开
-
Java 生产者和消费者问题
运行结果:code:class Info {private String name = "Carter";private int age = 25;public String getName() {return name;}public void setName(String name) {this.name = name;}原创 2013-06-07 19:11:01 · 716 阅读 · 0 评论 -
Java中Runnable和Thread的区别
在java中可有两种方式实现多线程,一种是继承Thread类,一种是实现Runnable接口;Thread类是在java.lang包中定义的。一个类只要继承了Thread类同时覆写了本类中的run()方法就可以实现多线程操作了,但是一个类只能继承一个父类,这是此方法的局限。下面看例子:package org.thread.demo; class MyThread extends Th转载 2013-06-07 18:45:55 · 606 阅读 · 0 评论 -
java简单客户端服务端
import java.net.*;import java.io.*;public class Service{public static void main(String[] args){InputStream in = null;OutputStream out = null;int port = 33333;try {ServerSoc原创 2013-06-07 22:29:54 · 897 阅读 · 0 评论 -
6点
Keep it simple - complexity will come naturally over time.Automate everything, including failure recovery.Iterate your solutions - be prepared to throw away a working component when you want t翻译 2014-10-29 17:41:09 · 664 阅读 · 0 评论 -
Java Code Examples for com.sun.net.httpserver.HttpExchange.getResponseHeaders()
The following are Jave code examples for showing how to use getResponseHeaders()of thecom.sun.net.httpserver.HttpExchange class. You can vote up the examples you like. Your votes will be used in o转载 2016-10-13 16:24:28 · 5249 阅读 · 0 评论 -
Java Thrift Hive
import java.util.List;import org.apache.hadoop.hive.service.HiveClient;import org.apache.hadoop.hive.service.HiveServerException;import org.apache.thrift.TException;import org.apache.thrif原创 2016-10-13 16:39:25 · 1993 阅读 · 0 评论