C++ÓëJava»ù±¾Êý¾ÝÀàÐͱȽÏ
C++ÓëJava»ù±¾Êý¾ÝÀàÐͼ°ËùÕ¼ÓÃÄÚ´æ¿Õ¼ä±È½Ï
----------------C++
----------- ------------Java
----------
(01)bool------------------1 byte 01)boolean--1 byte
(02)char------------------1 byte
02)char------2 bytes
(03)signed char---------1 byte 03)byte------1 byte
(04)unsigned char------1 byte
(05)wchar_t--------------2 bytes
(06)short-----------------2 bytes 04)short-----2 bytes
(07)unsigned short-----2 bytes
(08)int--------------------4 bytes 05)int---------4 bytes
(09)unsigned int--------4 bytes
(10)long------------------4 bytes
06)long-------8 bytes
(11)unsigned long-------4 bytes
(12)long long-------------8 bytes
(13)unsigned long long--8 bytes
(14)float-------------------4 bytes 07)float-------4 bytes
(15)double----------------8 bytes &nbs
Ïà¹ØÎĵµ£º
Javaѧϰ´ÓÈëÃŵ½¾«Í¨
Ò»¡¢ JDK (Java Development Kit)
JDKÊÇÕû¸öJavaµÄºËÐÄ£¬°üÀ¨ÁËJavaÔËÐл·¾³£¨Java Runtime Envirnment£©£¬Ò»¶ÑJava¹¤¾ßºÍJava»ù´¡µÄÀà¿â(rt.jar)¡£²»ÂÛʲôJavaÓ¦Ó÷þÎñÆ÷ʵÖʶ¼ÊÇÄÚÖÃÁËij¸ö°æ±¾µÄJDK¡£Òò´ËÕÆÎÕJDKÊÇѧºÃJavaµÄµÚÒ»²½¡£×îÖ÷Á÷µÄJ ......
1. Java Ô´ÎļþÖÐ×î¶àÖ»ÄÜÓÐÒ»¸öpublicÀà,¶øÇÒÕâ¸öÀàµÄÀàÃûÒªºÍÎļþÃûÒ»ÖÂ.ÆäËûÀàµÄ¸öÊý²»ÏÞ¡£
2. ÃæÏò¶ÔÏó³ÌÐòÉè¼ÆµÄÌØÕ÷£¨·â×°ÐÔ£©£¨¼Ì³Ð£©£¨¶à̬ÐÔ£©
3. ½Ó¿ÚÊÇÓÉ£¨³éÏó·½·¨£©ºÍ£¨³£Á¿£©×é³ÉµÄÌØÊâÀà
4. ÓÃstaticÐÞÊεķ½·¨Ê ......
JavaÖеÄ×Ö·û¼¯±àÂëÈëÃÅ
ASCII¼°Ïà¹Ø±ê×¼
¡¡¡¡µØÇòÈ˶¼ÖªµÀASCII¾ÍÊÇÃÀ¹ú±ê×¼ÐÅÏ¢½»»»ÂëµÄËõд£¬Ò²ÖªµÀASCII¹æ¶¨ÓÃ7λ¶þ½øÖÆÊý×ÖÀ´±íʾӢÎÄ×Ö·û£¬ASCII±»¶¨Îª¹ú¼Ê±ê×¼Ö®ºóµÄ ´úºÅΪISO-646.ÓÉÓÚASCIIÂëֻʹÓÃÁË7¸ö¶þ½øÖÆ룬Ҳ¾ÍÊÇ˵һ¸ö×Ö½Ú¿ÉÒÔ±íʾµÄ256¸öÊý×ÖÖУ¬Ëü½öʹÓÃÁË0-127Õâ128¸öÂëλ£¬Ê£Ï嵀 ......
Java ÊÇÒ»ÃÅÖ§³Ö¶àÏ̵߳ĵÄÓïÑÔ£¬µ«ÔÚ´¦Àí¶àÏß³ÌʼþʱÎÒÃDZØÐë×¢ÒâÕâÑùÒ»¸öÎÊÌ⣺¶à¸öÏ߳̿ÉÄÜͬʱ¶Ôͬһ¶ÔÏóµÄÐ޸ġ£Èç¹ûÎÒÃDz»¼°Ê±×÷³ö´¦Àí£¬¿ÉÄÜÒýÆð¶ÔÏóÖµµÄ»ìÂÒ¡£Æäʵ´¦Àí°ì·¨Ò²ºÜ¼òµ¥£¬¾ÍÊǵ±Ò»¸öÏ̴߳¦ÀíÒ»¸ö¶ÔÏó£¬Ëøס¸Ã¶ÔÏó¡£ ......
JAVA³£ÓÃÀàµÄʹÓ÷½·¨
£±¡¢IntegerÀà
£²¡¢FloatÀà
£³¡¢DoubleÀà
£´¡¢CharacterÀà
£µ¡¢StringÀà
£¶¡¢StringTokenizerÀà
£·¡¢StringBufferÀà
£¸¡¢RandomÀà
1£®IntegerÀàµÄʹÓ÷½·¨
Interger£ºÕûÊýÀàÐÍ
£±¡¢ÊôÐÔ¡£
static int MAX_VALUE£º·µ»Ø×î´óµÄÕûÐÍÊý£»
static int MIN_VALUE£º·µ»Ø×îСµÄÕûÐÍÊý£»
static C ......