今天来给大家分享一下java的重点易错点第二部分,也是各位同学面试需要准备的,欢迎大家交流指正。1.字符串创建与存储机制:当创建一个字符串时,首先会在常量池中查找是否已经有相同的字符串被定义,其判断的依据是String类型equals的返回值,若已经定义,则直接获取对其的引用。此时不需要创建新的对象...
分类:
编程语言 时间:
2015-05-14 22:01:00
阅读次数:
232
使用Apache fileUpload库上传文件(支持多个文件):
Spring 3.0验证通过。
import org.apache.commons.fileupload.DiskFileUpload;
import org.apache.commons.fileupload.FileItem;
public String upload(ItemAction...
分类:
Web程序 时间:
2015-05-14 20:36:10
阅读次数:
135
///首先在控件栏定位到:Indy Clients加入控件IdSMTP///再定位到:Indy Misc加入控件IdMessage///发送邮件函数procedure TForm1.SendMail(YYuser: string;YYpass:string); begin try IdS...
UiSelector对象可以理解为一种条件对象,描述的是一种条件,可以配合UiObject使用得到某个符合条件的控件对象。所有的方法都是public的,且都返回UiSelector类的对象。文本方面的方法: 1.text(String text) 文本 2.textContains(String.....
分类:
移动开发 时间:
2015-05-14 20:18:49
阅读次数:
127
Write a function to find the longest common prefix string amongst an array of strings.
分类:
其他好文 时间:
2015-05-14 20:14:06
阅读次数:
99
A. 不可变字符串 1 void stringCreate() 2 { 3 //Don't need to release memory by this way 4 NSString *str1 = @"String Sample"; 5 6 NSString *st...
分类:
其他好文 时间:
2015-05-14 20:09:33
阅读次数:
101
num=(String)session.getAttribute(day);1.session要进行强制转换才可以赋值2.session.getAttribute(day)里的day应该是字符串错误: DBResult rst=new DBResult();这句报错Default construc....
分类:
数据库 时间:
2015-05-14 20:06:15
阅读次数:
162
创建线程的两种方式继承Thread类
定义一个类继承Thread类
子类中重写Thread类中的run方法
创建Thread子类的对象,就是创建了线程对象
调用线程对象的start方法,启动线程,会自动调用run方法
public class TestThread extends Thread { public static void main(String[] args) {...
分类:
编程语言 时间:
2015-05-14 18:48:33
阅读次数:
104
Problem:
Given a string containing just the characters '(' and ')',
find the length of the longest valid (well-formed) parentheses substring.
For "(()", the longest valid parentheses substri...
分类:
编程语言 时间:
2015-05-14 18:44:41
阅读次数:
121