---restore content starts---
Public classDataType { Public Static voidMain (string[] args) {//Basic data Types//define a variable of type byte bytea=127; Shorts=22288; intd=38124279; //default int type, long type L or L Longf=123445567343563456l; //decimal Float type default double type Doublez=1323.1223; Doublec=23.12434243; floatx= 1.224434353f; //Character Type CharN= ' s '; CharM= ' Me '; System.out.println (M+ "Yes" +N); C=34.4; System.out.println (c); //Character Set Java utf-8 (blog Park) Booleanp1=true, p2=false; System.out.println (P1+"+"+p2); intk= ' l '; System.out.println (k); System.out.println ("A word."); System.out.println ("A word \ r enter"); System.out.println ("A Word \ t tab"); System.out.println ("This is a word \ t tab");
java output UTF8 encoding
UTF-8 (8-bit Unicode Transformation Format) is a variable-length character encoding for Unicode, also known as the Universal Code. Created by Ken Thompson in 1992. It is now standardized to RFC 3629.
UTF-8 encodes Unicode characters in 1 to 6 bytes. The same page can be used to display Chinese simplified traditional and other languages (such as English, Japanese, Korean).
-
Java Basic data types