Generics, Inheritance, and Subtypes
正如你所知,可以把一种对象类型赋值给另一种类型,只要他们是兼容的。例如,你可以把Integer对象赋值给Object。
Object someObject = new Object();
Integer someInteger = new Integer(10);
someObject = someIntege...
分类:
编程语言 时间:
2015-04-16 12:34:04
阅读次数:
124
Delphi的Format函数大家都用得很多,第二个参数用着确实很方便。最近在数据库开发应用中需要自己创建一个带array of const参数的函数,对于常用的类型String,Integer,Pointer处理都没什么问题,但当用到Widestring类型时却出错,摸索了一上午,感觉获益良多。现...
分类:
其他好文 时间:
2015-04-16 12:09:07
阅读次数:
113
Given a string ‘str’ of digits and an integer ‘n’, build the lowest possible number by removing ‘n’ digits from the string and not changing the order ...
分类:
其他好文 时间:
2015-04-16 11:49:38
阅读次数:
179
在androiddeveloper的开发文当中是这么描述SparesArray的:SparseArraysmapintegerstoObjects.UnlikeanormalarrayofObjects,therecanbegapsintheindices.ItisintendedtobemoreefficientthanusingaHashMaptomapIntegerstoObjects.大概意思是SparseArrays是映射Integer—>Obje..
分类:
移动开发 时间:
2015-04-16 06:52:39
阅读次数:
203
在androiddeveloper的开发文当中是这么描述SparesArray的:SparseArraysmapintegerstoObjects.UnlikeanormalarrayofObjects,therecanbegapsintheindices.ItisintendedtobemoreefficientthanusingaHashMaptomapIntegerstoObjects.大概意思是SparseArrays是映射Integer—>Obje..
分类:
移动开发 时间:
2015-04-16 06:52:22
阅读次数:
169
题目:Determine whether an integer is a palindrome. Do this without extra space.click to show spoilers.Some hints:Could negative integers be palindromes?...
分类:
其他好文 时间:
2015-04-15 23:20:59
阅读次数:
159
题目:Implementatoito convert a string to an integer.Hint:Carefully consider all possible input cases. If you want a challenge, please do not see below a...
分类:
其他好文 时间:
2015-04-15 23:17:55
阅读次数:
125
题目:Reverse digits of an integer.Example1:x = 123, return 321Example2:x = -123, return -321链接:http://leetcode.com/problems/reverse-integer/题解:
分类:
其他好文 时间:
2015-04-15 23:08:46
阅读次数:
121
ObjectsR has five basic or “atomic” classes of objects: character numeric (real numbers) integer complex logical (True/False)The most basic object is ...
分类:
其他好文 时间:
2015-04-15 23:00:55
阅读次数:
136
Reverse digits of an integer.Example1:x = 123, return 321Example2:x = -123, return -321总结:处理整数溢出的方法①用数据类型转换long 或 long long②在每次循环时先保存下数字变化之前的值,处理后单步恢复...
分类:
其他好文 时间:
2015-04-15 22:42:09
阅读次数:
121