import java.lang.StringBuilder; public class Stringadd { ?public static void method1() { ??String[] name = { "嘿嘿", "嘻", "等等等" }; ??StringBuffer sb = new StringBuffer(); ??for (int i = ...
分类:
编程语言 时间:
2015-05-28 11:06:02
阅读次数:
168
看了一段代码,根据版本的编译日期生成版本号,觉得很不错,记下来以后可用,哈哈
GetVersion()
{
std::string monthes[] =
{
"Jan",
"Feb",
"Mar",
"Apr",
"May",
"Jun",
"Jul",
"Aug",
"Sep",
"Oct", ...
分类:
编程语言 时间:
2015-05-28 10:57:15
阅读次数:
208
$input = array(4, "4", "3", 4, 3, "3"); $result = array_unique($input); *//**array(2) { [0] => int(4) [2] => string(1) "3" }**/
分类:
编程语言 时间:
2015-05-28 10:51:48
阅读次数:
151
SimpleDateFormat设置自己想要的日期时间显示方式:import java.text.SimpleDateFormat;
import java.util.Date;public class FormatDemo {
public static void main(String[] args) {
// TODO Auto-generated method stu...
分类:
编程语言 时间:
2015-05-28 09:45:18
阅读次数:
228
1:日期格式化
SimpleDateFormat fmt = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
日期的格式如:
"yyyy-MM-dd HH:mm:ss"
"yyyyMMdd"
"dd/MM/yy"
"MM/dd/yyyy"
常用方法
fmt.parse(String) 可以实现将(合法)字符串解析为日期类型,经常用...
分类:
编程语言 时间:
2015-05-28 09:39:27
阅读次数:
181
先上题目:
Given a string containing just the characters '(', ')', '{', '}', '[' and ']',
determine if the input string is valid.
The brackets must close in the correct order, "()" and "()[]{}" a...
分类:
编程语言 时间:
2015-05-28 09:32:29
阅读次数:
206
Java语言包(java.lang)定义了Java中的大多数基本类,由Java语言自动调用,不需要显示声明。该包中包含了Object类,Object类是整个类层次结构的根结点,同时还定义了基本数据类型的类,如:String、Boolean、Byter、Short等。这些类支持数字类型的转换和字符串的...
分类:
编程语言 时间:
2015-05-28 09:24:20
阅读次数:
235
一、图解String类创建对象及赋值面试题:二、String、StringBuffer、StringBuilder区别 1、String内容不可变,而StringBuffer、StringBuilder都是内容可变的 2、StringBuffer是同步的,数据安全,效率低;StringBuild.....
分类:
编程语言 时间:
2015-05-28 09:19:48
阅读次数:
192
题目:Given a string containing only digits, restore it by returning all possible valid IP address combinations.For example:Given"25525511135",return["25...
分类:
其他好文 时间:
2015-05-28 09:17:01
阅读次数:
169
第三道题Longest
Substring Without Repeating Characters如下:
public class Solution {
public int lengthOfLongestSubstring(String s) {
HashMap hs = new HashMap();
int maxl = 0;...
分类:
编程语言 时间:
2015-05-28 08:15:38
阅读次数:
264