diff options
author | Allen Byrne <50328838+byrnHDF@users.noreply.github.com> | 2022-01-24 21:41:03 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-01-24 21:41:03 (GMT) |
commit | 7f214d6e0ded27bc44d354396eb72ff2f65f1f03 (patch) | |
tree | fa13d8d2fa704eee096dd2dda7e27f82867a74d0 /java/examples/datasets | |
parent | b88cfdbfc9a6f2ff737d73ba4cb4931e5ffe2e74 (diff) | |
download | hdf5-7f214d6e0ded27bc44d354396eb72ff2f65f1f03.zip hdf5-7f214d6e0ded27bc44d354396eb72ff2f65f1f03.tar.gz hdf5-7f214d6e0ded27bc44d354396eb72ff2f65f1f03.tar.bz2 |
Merge various cleanup java test, test files, comments (#1365)
Plus some spelling corrections
Diffstat (limited to 'java/examples/datasets')
-rw-r--r-- | java/examples/datasets/H5Ex_D_Sofloat.java | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/java/examples/datasets/H5Ex_D_Sofloat.java b/java/examples/datasets/H5Ex_D_Sofloat.java index a42aba4..8edde09 100644 --- a/java/examples/datasets/H5Ex_D_Sofloat.java +++ b/java/examples/datasets/H5Ex_D_Sofloat.java @@ -21,6 +21,9 @@ ************************************************************/ package examples.datasets; +import java.text.DecimalFormat; +import java.text.DecimalFormatSymbols; +import java.util.Locale; import java.util.EnumSet; import java.util.HashMap; import java.util.Map; @@ -123,8 +126,9 @@ public class H5Ex_D_Sofloat { } // Print the maximum value. - System.out.println("Maximum value in write buffer is: " + max); - System.out.println("Minimum value in write buffer is: " + min); + DecimalFormat df = new DecimalFormat("#,##0.000000", new DecimalFormatSymbols(Locale.US)); + System.out.println("Maximum value in write buffer is: " + df.format(max)); + System.out.println("Minimum value in write buffer is: " + df.format(min)); // Create a new file using the default properties. try { @@ -308,8 +312,9 @@ public class H5Ex_D_Sofloat { } // Print the maximum value. - System.out.println("Maximum value in " + DATASETNAME + " is: " + max); - System.out.println("Minimum value in " + DATASETNAME + " is: " + min); + DecimalFormat df = new DecimalFormat("#,##0.000000", new DecimalFormatSymbols(Locale.US)); + System.out.println("Maximum value in " + DATASETNAME + " is: " + df.format(max)); + System.out.println("Minimum value in " + DATASETNAME + " is: " + df.format(min)); // End access to the dataset and release resources used by it. try { |