int------->Stringinti=12345;Strings="";第一种方法:s=i+"";第二种方法:s=String.valueOf(i);这两种方法有什么区别呢?作用是不是一样的呢?是不是在任何下都能互换呢?String------->ints="12345";inti;第一种方法:i=Integer.parseInt(s);第二种方法:i=Integer.val..
分类:
移动开发 时间:
2014-11-22 19:01:16
阅读次数:
171
https://github.com/huangz1990/redis-3.0-annotated/blob/unstable/src/sds.c#L120 1 /* SDSLib, A C dynamic strings library 2 * 3 * Copyright (c) ...
分类:
其他好文 时间:
2014-11-22 00:35:05
阅读次数:
341
Not so Mobile
Before being an ubiquous communications gadget, a
mobile was just a structure made of strings and wires suspending colourfull things. This kind of mobile is usually found h...
分类:
其他好文 时间:
2014-11-21 23:21:20
阅读次数:
213
Assume you have a method isSubstring which checks if one word is a substring of another. Given two strings, s1 and s2, write code to check if s2 is .....
分类:
其他好文 时间:
2014-11-21 15:51:15
阅读次数:
232
Given two numbers represented as strings, return multiplication of the numbers as a string.Note: The numbers can be arbitrarily large and are non-nega...
分类:
其他好文 时间:
2014-11-21 06:56:07
阅读次数:
122
Given two binary strings, return their sum (also a binary string).For example,a ="11"b ="1"Return"100".Solution: 1 public class Solution { 2 publi...
分类:
其他好文 时间:
2014-11-20 18:18:52
阅读次数:
206
题目链接DescriptionYaroslav thinks that two stringssandw, consisting of digits and having lengthnare non-comparable if there are two numbers,iandj(1?≤?i,?...
分类:
其他好文 时间:
2014-11-19 22:06:35
阅读次数:
228
Given an array of strings, return all groups of strings that are anagrams.
Note: All inputs will be in lower-case.
原题链接:https://oj.leetcode.com/problems/anagrams/
易位构词游戏的英文词汇是 anagram,这个词来源于有...
分类:
其他好文 时间:
2014-11-19 11:24:01
阅读次数:
170
写一个函数,检查字符是否是整数,如果是,返回其整数值。packagebfgy.lab.work;
importjava.util.Scanner;
publicclassThree{
publicstaticvoidmain(String[]arg){
Strings;
Scannersc=newScanner(System.in);
s=sc.next();
if(isNumeric(s))
{
Syst..
分类:
其他好文 时间:
2014-11-19 02:13:04
阅读次数:
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-negative.
原题链接:https://oj.leetcode.com/problems...
分类:
其他好文 时间:
2014-11-19 01:52:17
阅读次数:
141