Java Compiler disable()方法与示例
编译器类disable()方法
disable()方法在java.lang包中可用。
disable()方法用于使编译器停止操作。
disable()方法是一个静态方法,可以使用类名进行访问,如果尝试使用类对象访问该方法,则不会出现任何错误。
disable()方法在停止操作时不会引发异常。
语法:
public static void disable();
参数:
它不接受任何参数。
返回值:
此方法的返回类型为void,不返回任何内容。
示例
//Java程序演示示例
//disable()编译器的void方法的说明
public class Disable {
public static void main(String args[]) {
//该代码用于检查是否启用了编译器
Compiler.enable();
System.out.println("Enabled Compiler by using enable() ");
Compiler.command("{java.lang.Byte.*} (compile)");
byte by = 20;
Byte b = new Byte(by);
//显示值
System.out.println("b = " + b);
//该代码用于检查是否禁用了编译器
System.out.println("Disabled Compiler by using disable() ");
Compiler.disable();
}
}输出结果
Enabled Compiler by using enable() b = 20 Disabled Compiler by using disable()
热门推荐
1 训练狗狗憋尿
2 狗狗追踪训练
3 狗狗训练要多少钱
5 深圳狗狗训练
6 训练狗狗唤回
7 狗狗叫怎么训练
8 狗狗训练班
10 狗狗社会化训练
11 狗狗叫回训练
12 广州狗狗训练学校
13 狗狗训练躺下
14 狗狗随行训练
15 训练狗狗巡回
16 狗狗要怎么训练
17 狗狗喂食训练
18 训练狗狗躺下