JAVA foundation
zjhgx
Cobol工程师
展开
-
Getting started with enumerated types
Level: IntroductoryBrett McLaughlin (brett@newInstance.com), Author/Editor, OReilly Media, Inc.09 Nov 2004One of the great new features in Tiger is the enumeration construct, a new type that al原创 2008-09-05 18:04:00 · 572 阅读 · 0 评论 -
String 中的转义字符‘\r\n’在用EMAIL发出来后发现在OUTLOOK中没起作用
content.append("Error occurs when allocate this SHTT messages - ").append("\r\n").append("Error Message -").append("\r\n"); 发现在email中的内容中没有换行。google 了一下,国外的朋友说要在每行最后加个"."就可以了,所以改成content.append(原创 2012-06-14 10:52:50 · 5478 阅读 · 0 评论 -
pwMatrix
<br />Exception in thread "main" org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'dataSourceHelper' defined in class path resource [testDBApplicationContext.xml]: Invocation of init method failed; nested exception is原创 2010-10-18 20:04:00 · 1840 阅读 · 0 评论 -
在model 中定义get / set 方法时变量名的第二位不能是大写
<br /> 在 gecBorrow.java中定义一个<br /> //for reverse allocation of manually entered qty<br /> private String rAllocKey;<br /><br /><br /> public String getRAllocKey() {<br /> return rAllocKey;<br /> }<br /> public void setR原创 2010-12-08 18:08:00 · 1265 阅读 · 0 评论 -
flex 中 的 arraycollection 传到后台List 发现里面的不是LONG
<br />GecBorrowAllocationVO 中的 borrowIds 为Number 的ArrayCollection,传到后台发现虽然<br />gecBorrowAllocation 中<br /> <br />private List<Long> borrowIds;<br /> <br />但里面的元素是Integer,<br /> <br />List bIds = allo.getBorrowIds();<br />Long bId = ((Integer)bIds.get(0)).原创 2010-12-08 18:15:00 · 646 阅读 · 0 评论 -
Annotations in Tiger, Part 2: Custom annotations
<br />In the first article in this series, I explained what metadata is, why it's valuable, and how to use the basic built-in annotations introduced in J2SE 5.0 (aka Tiger). If you're comfortable with these concepts now, you might already be thinki原创 2010-10-18 12:48:00 · 439 阅读 · 0 评论 -
Annotations in Tiger, Part 1: Add metadata to Java code
<br />One of the latest trends in programming, particularly in Java programming, is the use of metadata. Metadata, simply put, is data about data. Metadata can be used to create documentation, to track down dependencies in code, and even to perfo原创 2010-10-18 12:44:00 · 922 阅读 · 1 评论 -
容易被忽略的JAVA赋值操作
<br />炸一看,觉得赋值操作没什么可说的,无非就是:使用操作符“=”,表示 “把右边的值复制给左边”,右边的值可以是任何常数、变量或者表达式(只要它能生成一个值就行)<br />但是在JAVA中,赋值的操作并不紧紧表示值的复制,单纯的这样认为,会掉入赋 值操作的陷阱,值得注意!<br /> <br />一、值复制<br /> 对基本数据类型的赋值是值的复制。基本类型存储了实际的数值,而不是指向一个对象的引用,所以在为其赋值的时候,是直接将内容复制给左边的变量;例如,对 基本数据转载 2010-09-16 20:55:00 · 795 阅读 · 0 评论 -
关于request遇到的一个问题
<br />如果在request 的URL中写好method,则在后台执行的时候只做第一次?<br />如<br /> rul = "broker/pdf.report?method=exportGECReport&format=pdf"<br /> var downloadURL:URLRequest = new URLRequest(url);<br /> var downLoadfile:FileReference = new Fi原创 2010-06-23 14:41:00 · 1242 阅读 · 0 评论 -
java压缩对象 与 对象的序列化
gzip是目前广泛应用的一种压缩方式,它具有很高的压缩比和压缩效率.在sun公司发布的jdk中包含了java.util.zip包,对gzip提供了直接支持.使用java语言可以很方便的实现gzip压缩和解压缩.以下是一个压缩和解压缩的最简程序. (压缩:gzip.java) import java.io.*; import java.util.zip转载 2009-12-08 16:21:00 · 3924 阅读 · 0 评论 -
java 开发中遇到的问题
1 public Funds fund = new Funds(); 没有用到 new ,结果null pointer exception. 2。 由于instance 变量与方法内变量同名所引发的问题:如一个 instance 变量 recordsList 在一个方法中的一个变量 也是 recordList,结果方法中的recordList 赋了list,但inst原创 2009-11-02 18:39:00 · 438 阅读 · 0 评论 -
JAVA异常处理方式的区别和分析
一、内层方法抛出异常,外层方法捕捉并处理异常:public void methodA (){ try{ // 调用methodB methodB(); } catch(ExceptionType et){ // 相应处理措施 }}public void methodB throws ExceptionType{ if (condition i转载 2009-09-01 15:32:00 · 338 阅读 · 0 评论 -
[转]一个计算机专业学生几年的Java编程经验汇总收藏
转载 2009-06-09 18:57:00 · 432 阅读 · 0 评论 -
Configuring the Java Virtual Manager (JVM)
WindowsTo set Java heap size options with Sun Java (JAVA_OPTS environment variable) on WindowsOn the taskabar, click Start, and then point toSettings, Control Panel, and System.In the原创 2012-07-13 17:09:39 · 530 阅读 · 0 评论