4.1. Introduction to Object-Oriented ProgrammingObject-oriented programming, or OOP for short, is the dominant programming paradigm these days, having...
分类:
编程语言 时间:
2015-04-15 16:38:47
阅读次数:
178
Java类型 本地类型 描述boolean jboolean C/C++8位整型byte jbyte C/C++带符号的8位整型char jchar C/C++无符号的16位整型short jshort C/C++带符号的16位整型int ...
分类:
编程语言 时间:
2015-04-14 16:08:42
阅读次数:
131
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
android:id="@+id/short...
分类:
移动开发 时间:
2015-04-14 11:22:10
阅读次数:
152
1、最后的笑声:
System.out.println('H' + "a");
System.out.println('H' + 'a');
结果:Ha169
这里需要注意到的是“+”运算符
在java里,参与“+”运算的两个操作数会被先提升到int型,然后运算。因此先'H'+'a'相当于 (int)('H'+'a')。
类似的:
short x = 1;
short y = 1;...
分类:
其他好文 时间:
2015-04-14 08:31:33
阅读次数:
120
小类型向大类型的转换会自动完成,不需要程序员编写额外的代码,由jvm负责。ps:自动类型转换也叫“隐式类型转换”。自动类型转换的规则:符号位会自动扩展,负数补1,正数补0自动类型转换包含以下情况: 1.byte->short->int->long->double-> 2.int和...
分类:
其他好文 时间:
2015-04-14 00:21:35
阅读次数:
244
第一部分C和ASM作为基础, 要长相看,莫相忘......1. 数据类型1.1 整数以下是基本整数关键字:* char : 有符号8位整数;* short : 有符号16位整数;* int : 有符号32位整数;* long : 在32位系统上是32位整数, 在64位系统上则是64位整数;* lon...
分类:
其他好文 时间:
2015-04-13 22:29:09
阅读次数:
280
int 4字节-2 147 483 648~2 147 483 647(正好超过20亿)short 2字节-32 768~32 767long 8字节-9 223 372 036 854 775 808~9 223 372 036 854 775 807byte 1字节-128~127char2字节...
分类:
编程语言 时间:
2015-04-13 22:28:17
阅读次数:
140
判断PC机大小端 1 #include 2 #include 3 4 int main() 5 { 6 short a = 0x0102; 7 char *p = (char*)(&a); 8 9 //低字节存储在低地址10 if(*p == 2 && *(p +...
分类:
其他好文 时间:
2015-04-13 18:22:28
阅读次数:
128
将0x10000赋给一个int变量,在不同编译器中的结果1、在VC6.0中: 1 // 0x10000是否越界int.cpp : 2 // 看看0x10000是否超了int, 3 // 理论上1个char是8bit,就是0xFF;1个int是16bit,就是0xFFFF;所以0x10000应该是超的...
分类:
其他好文 时间:
2015-04-12 17:31:57
阅读次数:
108
关键词:变量 常量 运算符1.JAVA中的关键词:是被赋予特殊含义的单词,其特点是所有的字母都是小写。例如:class,interface,byte,int,short,void,if,while,break……2.JAVA中的标识符:在程序中自定义的一些名称,例如,类名、方法名,变量名等等。 a....
分类:
编程语言 时间:
2015-04-12 11:53:42
阅读次数:
151