-
Notifications
You must be signed in to change notification settings - Fork 11
Expand file tree
/
Copy pathMain.java
More file actions
31 lines (26 loc) · 1.06 KB
/
Main.java
File metadata and controls
31 lines (26 loc) · 1.06 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
package expression;
import java.util.Map;
public class Main {
public static void main(String[] args) {
Map.of(1, 2);
// System.out.println(new Add(new Variable("a"), new Subtract(new Variable("b"), new Variable("c"))).toMiniString());
// if (args.length != 1) {
// throw new IllegalArgumentException("1 argument required");
// }
// int x = Integer.parseInt(args[0]);
// System.out.println(new Add(new Variable("x"), new Const(2)).equals(new Add(new Variable("x"), new Const(2))));
// System.out.println(
// new Add(
// new Subtract(
// new Multiply(
// new Variable("x"),
// new Variable("y")),
// new Multiply(
// new Variable("z"),
// new Const(2))
// ),
// new Const(1)
// ).evaluate(5, 4, 3));
// System.out.println(new Add(new Variable("x"), new Const(2)).evaluate(3));
}
}