-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathex1.html
More file actions
29 lines (25 loc) · 828 Bytes
/
ex1.html
File metadata and controls
29 lines (25 loc) · 828 Bytes
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
<!DOCTYPE html>
<html lang="en">
<head>
<link rel="stylesheet" href="https://javaalmanac.io/almanac.min.css">
</head>
<body>
<div class="content" id="content">
<sandbox version="java17" mainclass="Main" preview="true" v-cloak>
<sandbox-source name="Main.java">
public class Main {
public static void main(String[] args) {
Shape c = new Circle(new Point(10, 10), 10);
System.out.println(c);
Shape l = new Line(new Point(0, 0), new Point(10, 10));
System.out.println(l);
Shape p = new Polygon(new Point(0, 0), new Point(10, 10), new Point(-10, -10), new Point(5, 10), new Point(-5, -10));
System.out.println(p);
}
}</sandbox-source>
</sandbox>
</div>
<script src="https://javaalmanac.io/app/sandbox-bundle.js"></script>
<script>new Vue({ el: '#content' })</script>
</body>
</html>