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字符。用在网页上可以同一页面显示中文简体繁体及其它语言(如英文,日文,韩文)。

    
    

    -

  • 相关阅读:
    kafka 0.8.x producer Example(scala)
    Google V8扩展利器发布:v8-native-binding-generator
    beyond compare秘钥被禁
    STL算法之find
    十条nmap常用的扫描命令
    cgdb UTF-8乱码
    OpenWrt笔记
    openwrt hotplug
    git常用操作
    c99标准的restrict关键字
  • 原文地址:https://www.cnblogs.com/1ming/p/5206102.html
Copyright © 2011-2022 走看看