字节码是构成Java平台无关性的基石。实现语言无关性的基础是虚拟机和字节码存储格式。Java语言中的各种变量、关键字和运算符的语义最终是由多条字节码命令组成,因此字节码命令所能提供的语义描述能力肯定会比Java语言本身更强大。Class类文件的结构 Class文件是一组以8位字节为基础单位的二...
分类:
其他好文 时间:
2015-05-29 09:51:31
阅读次数:
159
public class Solution { public String longestCommonPrefix(String[] strs) { //http://www.cnblogs.com/springfor/p/3872316.html if(strs=...
分类:
其他好文 时间:
2015-05-29 09:47:20
阅读次数:
83
反射,提供了一种在程序运行期间分析类型的能力虚拟机为每种类型管理一个Class对象Object中的getClass方法会返回一个Class实例Date d = new Date();Class c = d.getClass();String name = c.getName(); //name被设置...
分类:
其他好文 时间:
2015-05-29 09:45:48
阅读次数:
109
烧脑神题public class Solution { public boolean isMatch(String s, String p) { // 反正我是想不出来 http://www.cnblogs.com/springfor/p/3893593.html ...
分类:
其他好文 时间:
2015-05-29 08:34:13
阅读次数:
101
Sort a linked list using insertion sort. 1 class Solution { 2 public: 3 ListNode* insertionSortList(ListNode* head) { 4 ListNode *newhead=...
分类:
其他好文 时间:
2015-05-29 08:34:03
阅读次数:
103
public class Solution { public ArrayList getRow(int rowIndex) { ArrayList res = new ArrayList(); if (rowIndex = 0; j--) { ...
分类:
其他好文 时间:
2015-05-29 07:30:39
阅读次数:
158
Palindrome NumberDetermine whether an integer is a palindrome. Do this without extra space.public class Solution { public boolean isPalindrome(int ...
分类:
其他好文 时间:
2015-05-29 07:26:14
阅读次数:
136
极值问题public class Solution { public int myAtoi(String str) { // 要考虑清楚极值问题 if(str==null || str.length()==0) return 0; int i=0, r...
分类:
其他好文 时间:
2015-05-29 06:13:02
阅读次数:
131
public class Solution { public String convert(String s, int numRows) { // http://www.cnblogs.com/springfor/p/3889414.html // 略无聊,就是斜角...
分类:
其他好文 时间:
2015-05-29 06:12:55
阅读次数:
171
这道题不考虑越界问题的话,最粗暴的解法public class Solution { public int reverse(int x) { int rev =0; while(x!=0){ rev =rev*10+x%10; ...
分类:
其他好文 时间:
2015-05-29 06:09:45
阅读次数:
200