zoukankan      html  css  js  c++  java
  • JAVA基本数据类型

    ---恢复内容开始---

    public class DataType 
    {
    
        public static void main(String[] args) 
        {
            //基本数据类型
            
            //定义byte类型的变量
            byte a=127;
            
            short s=22288;
            
            int d=38124279;
            
            //默认int型,long型后头加L或l
            long f=123445567343563456L;
            
            
            //小数浮点型默认double型
            double z=1323.1223;
            double c=23.12434243;
            
            
            float x= 1.224434353f;
            
            //字符型
            
            char n='s';
            char m='我';
            System.out.println(m+"是"+n);
            
            c=34.4;
            System.out.println(c);
            
            
            //字符集 java utf-8(博客园)
            
            boolean p1=true,p2=false;
            System.out.println(p1+"+"+p2);
            
            int k='l';
            System.out.println(k);
            
            
            System.out.println("一句话
    换行");
            System.out.println("一句话
    回车");
            System.out.println("一句话	制表符");
            System.out.println("这是一句话	制表符");
            
            
            


     

     

     

    java输出utf8编码

    UTF-8(8-bit Unicode Transformation Format)是一种针对Unicode的可变长度字符编码,又称万国码。由Ken Thompson于1992年创建。现在已经标准化为RFC 3629。

    UTF-8用1到6个字节编码UNICODE字符。用在网页上可以同一页面显示中文简体繁体及其它语言(如英文,日文,韩文)。

    
    

    -

  • 相关阅读:
    Bugly和dispatch_once Crash
    IQKeyboardManager
    Storyboard References
    Book
    Git管理
    iOS开发之RunLoop--转
    H264之PPS、SPS了解
    iOS之UI设置随记
    使用 github 本地项目上传到github上 步骤
    spring中自定义注解
  • 原文地址:https://www.cnblogs.com/1ming/p/5206102.html
Copyright © 2011-2022 走看看