原文地址:http://blog.csdn.net/free0sky/article/details/7927275一、String,StringBuffer, StringBuilder 的区别是什么?String为什么是不可变的?答: 1、String是字符串常量,StringBuffer和S....
分类:
编程语言 时间:
2015-06-08 22:53:36
阅读次数:
126
这个我想没有那个开发人员说不知道,但是里面有一个重载,这个不知道有多少开发人员知道!可以看到,我可以去掉字符串前后的指定字符,只要我在char[]中申请即可,而不是仅仅去掉空格,这次为什么要提它,是因为前几天用asp对接.net的时候遇到的,在asp中有一个join方法,但是它不像C#中的String.Join(“,”)方法可以去掉尾部的“,” ,比如数组{1,2,3},在asp中join后会变成“...
分类:
其他好文 时间:
2015-06-08 21:39:21
阅读次数:
123
C#中static void Main(string[ ] args)中的作用及解释
static 表示方法是静态的就是说方法在程序被编译的时候就被分配了内存,使用的时候不用生成某个类型的对象,知道程序退出才释放。
void 表示方法没有返回值,就是方法没有renturn 关键字。
main 是方法名,当然这个方法是特殊的方法,是Main()就是说是主函数,就是整个程序的入口,程序被编译后从...
using System;
using System.IO;
namespace IO操作
{
class Program
{
static void Main(string[] args)
{
Console.WriteLine(File.Exists(@"C:\IO.txt"));
Console...
Hibernate在更新对象的时候,如果对象的有些属性没有设置,那么在更新的时候,会被默认为空。特别在更新表单对象的时候。例子:如: Department部门类该部门类有以下属性: id : Long name : String (注:部门名称)description : String (注:部门说...
分类:
Web程序 时间:
2015-06-08 21:23:11
阅读次数:
128
1. 题目:Longest Substring Without Repeating CharactersGiven a string, find the length of the longest substring without repeating characters. For example...
分类:
其他好文 时间:
2015-06-08 21:19:56
阅读次数:
106
1 public class TestOutOfBound { 2 public static void main(String[] args) { 3 4 System.out.println(Integer.MAX_VALUE-(-Integer.MAX_VALUE)); //内存溢出 ...
分类:
其他好文 时间:
2015-06-08 21:18:06
阅读次数:
266
1.一定要注意findViewId这个方法,尤其是含有多个相同的R.id的名字时,debug时不会当场报错,但随后会报空指针错误
2.List转换为Array可以这样处理:
ArrayList list=new ArrayList();
String[] strings = new String[list.size()];
list.toArray(stri...
分类:
移动开发 时间:
2015-06-08 19:38:47
阅读次数:
137
在iOS开发中,特别是在对Web服务调用的时候,经常会遇到请求参数为中文的情况,那么这时候就需要将Url转成UTF-8编码才能进行请求。使用stringByAddingPercentEscapesUsingEncoding:方法可以将string转成UTF-8编码,如下面代码NSURL *url =...
分类:
移动开发 时间:
2015-06-08 19:27:27
阅读次数:
136
题目:Given two numbers represented as strings, return multiplication of the numbers as a string.Note: The numbers can be arbitrarily large and are non-n...
分类:
其他好文 时间:
2015-06-08 19:23:30
阅读次数:
140