Skip to content

Commit bc76999

Browse files
committed
tweak longest java col width
1 parent 989f52e commit bc76999

1 file changed

Lines changed: 5 additions & 4 deletions

File tree

language_reference/languages/java/Java.java

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -319,11 +319,11 @@ void define_2d_arrays() {
319319
System.out.println(grid1[0][0]); // VER: define_2d_arrays_with_nested_arrays
320320

321321
record Point(Integer x, Integer y) {} // VER: define_2d_arrays_with_1d_array_with_lookup_function
322-
record Dimension(Integer width, Integer height) { // VER: define_2d_arrays_with_1d_array_with_lookup_function
323-
Integer size() {return width() * height();} // VER: define_2d_arrays_with_1d_array_with_lookup_function
322+
record Dimension(Integer w, Integer h) { // VER: define_2d_arrays_with_1d_array_with_lookup_function
323+
Integer size() {return w() * h();} // VER: define_2d_arrays_with_1d_array_with_lookup_function
324324
Integer coord_to_index(Point p) {return coord_to_index(p.x(), p.y());} // VER: define_2d_arrays_with_1d_array_with_lookup_function
325-
Integer coord_to_index(Integer x, Integer y) {return (y * width()) + (x % width());} // VER: define_2d_arrays_with_1d_array_with_lookup_function
326-
Point index_to_coord(Integer i) {return new Point(i % width(), i / width());} // VER: define_2d_arrays_with_1d_array_with_lookup_function
325+
Integer coord_to_index(Integer x, Integer y) {return (y * w()) + (x % w());} // VER: define_2d_arrays_with_1d_array_with_lookup_function
326+
Point index_to_coord(Integer i) {return new Point(i % w(), i / w());} // VER: define_2d_arrays_with_1d_array_with_lookup_function
327327
} // VER: define_2d_arrays_with_1d_array_with_lookup_function
328328
// VER: define_2d_arrays_with_1d_array_with_lookup_function
329329
Dimension d = new Dimension(width, height); // VER: define_2d_arrays_with_1d_array_with_lookup_function
@@ -431,6 +431,7 @@ public Java() {
431431
define_map();
432432
define_set();
433433
function_with_param_function();
434+
define_2d_arrays();
434435
}
435436

436437
}

0 commit comments

Comments
 (0)