Java Basic data types

Source: Internet
Author: User

---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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.