20 lines
316 B
Plaintext
20 lines
316 B
Plaintext
import 'console';
|
|
class Test {
|
|
public void __construct(string $a) {
|
|
Console::Print("$a\n");
|
|
}
|
|
|
|
public void __construct(int $a, int $b) {
|
|
Console::Print("$a + $b = " + ($a + $b) + "\n");
|
|
}
|
|
|
|
}
|
|
|
|
class Program {
|
|
public void main() {
|
|
object $a, $b;
|
|
$a = new Test('Hello world!');
|
|
$b = new Test(4, 7);
|
|
}
|
|
}
|