helloworld.jsc
来自「《JavaScript王者归来》examples.rar」· JSC 代码 · 共 36 行
JSC
36 行
# language: javascript2
package akira.js2{
import js.lang.JObject;
import js.lang.System;
public class HelloWorld extends JObject
{
private var name = null;
private static var message = "Hello ";
//constructor
function HelloWorld(name)
{
this.name = name;
}
//getter and setter
public get Name()
{
return this.name;
}
public set Name(name)
{
this.name = name;
}
public function sayHello()
{
System.out.println(HelloWorld.message + this.name);
}
}
}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?