杭州某B2B软件公司面试题
package com.orz.www;
public class Test {
public static void main(String[] args) {
// 0 开头的是八进制数值,0x 开头的是十六进制数。
int i = 012;
int j = 034;
int k = (int)056L;
// 078是int的一个临界点,
// 报错:The literal 078 of type int is out of range
// int l = 078;
System.out.println(i);
System.out.println(j);
System.out.println(k);
/*
* 输出结果:
* 10
* 28
* 46
*/
}
}