随笔分类 -  00.Java & j2ee

上一页 1 ··· 3 4 5 6 7 8 下一页
摘要://TestLock.javapackage com.test.thread;import java.util.ArrayList;import java.util.List;import java.util.concurrent.ExecutionException;import java.util.concurrent.ExecutorService;import java.util.concurrent.Executors;import java.util.concurrent.Future;import java.util.concurrent.TimeUnit;import java 阅读全文
posted @ 2011-03-20 21:24 庚武 阅读(225) 评论(0) 推荐(0)
摘要:I/OCreateing a good input/ouput (I/O) system is one of the most difficult tasks for alanguage designer. This is evidenced by the number of different approaches.The challenge seems to be in covering all possibilities. Not only are there differentsources and sinks of I/O that you want to communicate w 阅读全文
posted @ 2011-03-18 11:09 庚武 阅读(159) 评论(0) 推荐(0)
摘要:AnnotationAnnotaions (also known as metadata) provide a formalized way to add information to yourcode so that you can easily use that data at some later point.Defining annotationsHere is the definition of the annotation above. You can see that annotation definitionslook a lot like interface definiti 阅读全文
posted @ 2011-03-18 11:08 庚武 阅读(338) 评论(0) 推荐(0)
摘要:Anytime you want to use type information at runtime, you must first get a reference to the appropriate Class object. Class.forName() is one convenient way to do this, because you don't need an object of that type in order to get the Class reference.However, if you already have an object of the t 阅读全文
posted @ 2011-03-16 19:39 庚武 阅读(503) 评论(1) 推荐(0)
摘要:package dynamicproxy;public interface SimpleInterface { void doSth(); void doSthElse(String s);}package dynamicproxy;public class RealObject implements SimpleInterface { @Override public void doSth() { System.out.println("Real Object do sth"); } @Override public void doSthElse(String s) { 阅读全文
posted @ 2011-03-16 19:17 庚武 阅读(347) 评论(1) 推荐(0)
摘要:Scanner scan=new Scanner("11, " + "22, 33, 44"); scan.useDelimiter("\\s*,\\s*"); while(scan.hasNextInt()){ System.out.println(scan.nextInt()); } 阅读全文
posted @ 2011-03-15 18:44 庚武 阅读(229) 评论(0) 推荐(0)
摘要:Where storage lives1.Registers2.The stack3.The heap4.Constant storage5.Non-RAM storagejava Primitive type: Wrapper type1.boolean Boolean2.char 16 bits Character3.byte 8 bits Byte4.short 16 bits Short5.int 32 bits Integer6.long 64 bits Long7.float 32 bits Float8.double 64 bits Double9.void VoidHigh-p 阅读全文
posted @ 2011-03-14 20:02 庚武 阅读(157) 评论(0) 推荐(0)
摘要:Step1:编写java类,e.g.:Step2: javac HelloWorld.javaStep3: javah HelloWorld生成头文件如下:Step4:用vc6建立一个win32 dll项目, 项目名helloStep5: tools->option->directory(标签)directories增加两个include 路径(具体看java的实际include路径):D:\java\jdk\jdk1.6.0_21\includeD:\java\jdk\jdk1.6.0_21\include\win32Step6:新建hello.cpp 阅读全文
posted @ 2011-02-17 12:23 庚武 阅读(349) 评论(0) 推荐(0)
摘要:Action.java 阅读全文
posted @ 2010-12-05 21:00 庚武 阅读(219) 评论(0) 推荐(0)
摘要:1.被代理对象的接口:2.被代理的对象:3.InvocationHandler包装:4.测试类: 阅读全文
posted @ 2010-11-28 19:43 庚武 阅读(260) 评论(0) 推荐(0)
摘要:Struts2 Resul Types 配置在 struts-core-2.xxx.jar中的 struts-default.xml中。[代码] 阅读全文
posted @ 2010-11-26 12:03 庚武 阅读(742) 评论(0) 推荐(0)
该文被密码保护。
posted @ 2010-11-24 12:35 庚武 阅读(1) 评论(0) 推荐(0)
摘要:xwork-convertion.propertiesactionName-convertion.properties注意 point=test.converter.PointerConverter最后不能有空格,否则查找出错.myeclipse svn使用: 阅读全文
posted @ 2010-11-23 00:32 庚武 阅读(142) 评论(0) 推荐(0)
摘要:<!--struts2配置--><package name="default" namespace="/login" extends="struts-default"> <action name="myLogin" class="test.action.LoginAction"> <result name="input">/index.jsp&l... 阅读全文
posted @ 2010-11-21 13:52 庚武 阅读(1613) 评论(0) 推荐(0)
摘要:The middle-tier component of the Java EE architecture consists of an application server often fronted by a web server. These servers serve up web content and execute servlets and JSP pages in response... 阅读全文
posted @ 2010-11-15 18:21 庚武 阅读(248) 评论(0) 推荐(0)
摘要:package tags;import java.util.Collection;import java.util.Iterator;import javax.servlet.jsp.JspException;import javax.servlet.jsp.tagext.TagSupport;public class IteratorTag extends TagSupport { privat... 阅读全文
posted @ 2010-11-13 19:48 庚武 阅读(459) 评论(0) 推荐(0)
摘要:[代码]Simple Tag[代码] 阅读全文
posted @ 2010-11-13 18:34 庚武 阅读(346) 评论(0) 推荐(0)
摘要:package test;import java.sql.*;public class TestJdbcForSqlserver2008 { /** * @param args */ public static void main(String[] args) { final String JDriver = "com.microsoft.sqlserver.jdbc.SQLServerDr... 阅读全文
posted @ 2010-11-13 10:36 庚武 阅读(1202) 评论(0) 推荐(0)
摘要:The JSTL is often referred to as a single tag library when in fact it's a collection of four tag libraries. Each tag library provides useful actions (or tags) based on the following functional areas:C... 阅读全文
posted @ 2010-11-11 18:18 庚武 阅读(138) 评论(0) 推荐(0)
摘要:Expression-LanguageImplicit Object DescriptionapplicationScopeThis is a Map that contains all application-scoped variables. The Map is keyed on the name of the variable. cookieThis is a Map that maps... 阅读全文
posted @ 2010-11-10 23:10 庚武 阅读(207) 评论(0) 推荐(0)

上一页 1 ··· 3 4 5 6 7 8 下一页