defaultvalue1.java
来自「这是一些java小程序的源码」· Java 代码 · 共 35 行
JAVA
35 行
//c3:DefaultValue1.java
//author:ZhangHongbin
//This program is protected by copyright laws.
//Initialization value of primitive.
class Primitive
{
boolean t;
char c;
byte b;
short s;
int i;
long l;
float f;
double d;
}
public class DefaultValue1
{
public static void main(String[] args)
{
Primitive d = new Primitive();
System.out.println("Primitive Data type Initial value");
System.out.println("boolean=" + d.t );
System.out.println( "null=["+"] ");
System.out.println( "char=[" + d.c + "] ");
System.out.println( "byte=" + d.b);
System.out.println("short=" + d.s);
System.out.println( "int=" +d.i);
System.out.println( "long=" + d.l);
System.out.println("float=" + d.f);
System.out.println("double=" + d.d);
}
}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?