|
代码公共类长分区{
publicstaticvoidmain (字符串[ ] args ) {
finallongmicros _ per _ day=24 * 60 * 60 * 1000 * 1000;
finallongmillis _ per _ day=24 * 60 * 60 * 1000;
system.out.println (micros _ per _ day/millis _ per _ day );
}
}
代码2
公共类多重{
publicstaticvoidmain (字符串[ ] args ) {
system.out.println((byte )-1 );
system.out.println((char ) ) byte(-1 );
system.out.println((int ) ) char ) ) byte(-1 );
}
}
代码3
公共类dos equis {
publicstaticvoidmain (字符串[ ] args ) {
char x='X ';
int i=0;
system.out.println (真? x : 0;
system.out.println (真? x :65536;
system.out.println(false? i : x;
}
}
代码4
公共类finallyt {
publicstaticvoidmain (字符串[ ] args ) {
system.out.println(test ) );
}
公共静态布尔测试(
try{
返回假;
}finally{
返回真;
}
}
}
代码5
公共类执行t {
publicstaticvoidmain (字符串[ ] args ) {
Exception t pointer=空值;
try{
pointer.print (;
}catch(nullpointerexceptione ) )
system.out.println(Hello,Exception! () );
}
}
公共静态语音打印(
system.out.println(Hello,World! () );
}
} |
|