字面值类型
byte b=127;
short s=30000;
int i=2140000000;
long l=900000000;
float f=3.14F;
double d=3.141592678987;
char c=’l’;
String str=”love”;
package com.weiliang;
public class VariableType {
public static void main(String[] args) {
double num = 3.14;
double num1 = 2.769343;
int num2 = 365;
int num3 = 12;
char eat = ‘吃’;
boolean falses = false;
String font = “不可描述”;
String tab = “\t hahah”;
byte b =100;
short s =20;
int i = 999999999;
long l = 999999999L;
float f = 13.14f;
double d =32421.2134;
char c = ‘中’;
String str = “我爱我的国”;
System.out.println(tab);
public class bianliang {
public static void main(String[] arges) {
byte b; b = 112;
short s; s = 16777;
int i ;i = 1236789674;
float f;f = 1278890899;
long l ; l=12312312L;
double d ;d = 123.46786786786786786787667867866786;
char c ;c= ‘文’;
String str;str = “不可预测”;
System.out.println(b+” “+s+” “+i+” “+f+” “+d+” “+c+” “+str );
}
}
1.本站大部分内容均收集于网络!若内容若侵犯到您的权益,请联系站长处理!
2.如果您喜欢我们,可开通终身会员,享受全站资源免费下载!
3.本站所有内容只做学习和交流使用。 版权归原作者所有。
好好好好好好好好好好好好好