PluginProbe
Code Block Pro – Beautiful Syntax Highlighting / 1.13.0
Code Block Pro – Beautiful Syntax Highlighting v1.13.0
1.27.1 1.27.2 1.27.3 1.27.4 1.27.5 1.27.6 1.27.7 1.28.0 1.3.0 1.4.0 1.5.0 1.5.1 1.5.2 1.6.0 1.7.0 1.8.0 1.9.0 1.9.1 1.9.2 1.9.3 trunk 1.1.0 1.10.0 1.11.0 1.11.1 All 63 releases
← All changes | build/shiki/samples/java.sample +6 -32 1.27.41.13.0 View file →
@@ -1,36 +1,10 @@
1 -import java.awt.Rectangle;
1 +public class HelloWorld {
2 2
3 -public class ObjectVarsAsParameters
4 -{ public static void main(String[] args)
5 - { go();
6 - }
3 + public static void main(String[] args) {
4 + // Prints "Hello, World" to the terminal window.
5 + System.out.println("Hello, World");
6 + }
7 7
8 - public static void go()
9 - { Rectangle r1 = new Rectangle(0,0,5,5);
10 - System.out.println("In method go. r1 " + r1 + "\n");
11 - // could have been
12 - //System.out.prinltn("r1" + r1.toString());
13 - r1.setSize(10, 15);
14 - System.out.println("In method go. r1 " + r1 + "\n");
15 - alterPointee(r1);
16 - System.out.println("In method go. r1 " + r1 + "\n");
17 -
18 - alterPointer(r1);
19 - System.out.println("In method go. r1 " + r1 + "\n");
20 - }
21 -
22 - public static void alterPointee(Rectangle r)
23 - { System.out.println("In method alterPointee. r " + r + "\n");
24 - r.setSize(20, 30);
25 - System.out.println("In method alterPointee. r " + r + "\n");
26 - }
27 -
28 - public static void alterPointer(Rectangle r)
29 - { System.out.println("In method alterPointer. r " + r + "\n");
30 - r = new Rectangle(5, 10, 30, 35);
31 - System.out.println("In method alterPointer. r " + r + "\n");
32 - }
33 -
34 8 }
35 9
36 -// From https://www.cs.utexas.edu/~scottm/cs307/javacode/codeSamples/ObjectVarsAsParameters.java
10 +// From https://introcs.cs.princeton.edu/java/11hello/HelloWorld.java.html