Skip to content

fix typo for unsigned method links for Long class for primitive-types tutorial #101

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions app/data/javadoc.json
Original file line number Diff line number Diff line change
Expand Up @@ -156,8 +156,8 @@

"Long": "java.base/java/lang/Long.html",
"Long.compareTo(Long)": "java.base/java/lang/Long.html#compareTo(java.lang.Long)",
"Long.compareUnsigned(int,int)": "java.base/java/lang/Long.html#compareUnsigned(int,int)",
"Long.divideUnsigned(int,int)": "java.base/java/lang/Long.html#divideUnsigned(int,int)",
"Long.compareUnsigned(long,long)": "java.base/java/lang/Long.html#compareUnsigned(long,long)",
"Long.divideUnsigned(long,long)": "java.base/java/lang/Long.html#divideUnsigned(long,long)",

"Arrays": "java.base/java/util/Arrays.html",
"Arrays.asList()": "java.base/java/util/Arrays.html#asList(T...)",
Expand Down Expand Up @@ -1408,4 +1408,4 @@
"Security.addProvider(java.security.Provider)": "java.base/java/security/Security.html#addProvider(java.security.Provider)",
"Security.insertProviderAt": "java.base/java/security/Security.html#insertProviderAt(java.security.Provider,int)"

}
}
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ Doing so tells your program that a field named `gear` exists, holds numerical da
- `byte`: The `byte` data type is an 8-bit signed two's complement integer. It has a minimum value of -128 and a maximum value of 127 (inclusive). The `byte` data type can be useful for saving memory in large arrays, where the memory savings actually matters. They can also be used in place of `int` where their limits help to clarify your code; the fact that a variable's range is limited can serve as a form of documentation.
- `short`: The `short` data type is a 16-bit signed two's complement integer. It has a minimum value of -32,768 and a maximum value of 32,767 (inclusive). As with `byte`, the same guidelines apply: you can use a short to save memory in large arrays, in situations where the memory savings actually matters.
- `int`: By default, the `int` data type is a 32-bit signed two's complement integer, which has a minimum value of -2<sup>31</sup> and a maximum value of 2<sup>31</sup>-1. In Java SE 8 and later, you can use the `int` data type to represent an unsigned 32-bit integer, which has a minimum value of 0 and a maximum value of 2<sup>32</sup>-1. Use the [`Integer`](javadoc:Integer) class to use `int` data type as an unsigned integer. See the section [The Number Classes](id:lang.numbers_strings.numbers) for more information. Static methods like [`compareUnsigned()`](javadoc:Integer.compareUnsigned(int,int)) have been added to the [`Integer`](javadoc:Integer) class to support the arithmetic operations for unsigned integers.
- `long`: The `long` data type is a 64-bit two's complement integer. The signed long has a minimum value of -2<sup>63</sup> and a maximum value of 2<sup>63</sup>-1. In Java SE 8 and later, you can use the `long` data type to represent an unsigned 64-bit long, which has a minimum value of 0 and a maximum value of 2<sup>64</sup>-1. Use this data type when you need a range of values wider than those provided by `int`. The [`Long`](javadoc:Long) class also contains methods like [`compareUnsigned()`](javadoc:Long.compareUnsigned(int,int)), [`divideUnsigned()`](javadoc:Long.divideUnsigned(int,int)) etc to support arithmetic operations for unsigned long.
- `long`: The `long` data type is a 64-bit two's complement integer. The signed long has a minimum value of -2<sup>63</sup> and a maximum value of 2<sup>63</sup>-1. In Java SE 8 and later, you can use the `long` data type to represent an unsigned 64-bit long, which has a minimum value of 0 and a maximum value of 2<sup>64</sup>-1. Use this data type when you need a range of values wider than those provided by `int`. The [`Long`](javadoc:Long) class also contains methods like [`compareUnsigned()`](javadoc:Long.compareUnsigned(long,long)), [`divideUnsigned()`](javadoc:Long.divideUnsigned(long,long)) etc to support arithmetic operations for unsigned long.

- `float`: The `float` data type is a single-precision 32-bit IEEE 754 floating point. Its range of values is beyond the scope of this discussion, but is specified in the [Floating-Point Types, Formats, and Values](doc:floating-point-types) section of the [Java Language Specification](doc:java-language-specification). As with the recommendations for `byte` and `short`, use a `float` (instead of `double`) if you need to save memory in large arrays of floating point numbers. This data type should never be used for precise values, such as currency. For that, you will need to use the [`java.math.BigDecimal`](javadoc:BigDecimal) class instead. [Numbers and Strings](id:lang.numbers_strings) covers [`BigDecimal`](javadoc:BigDecimal) and other useful classes provided by the Java platform.
- `double`: The `double` data type is a double-precision 64-bit IEEE 754 floating point. Its range of values is beyond the scope of this discussion, but is specified in the [Floating-Point Types, Formats, and Values](doc:floating-point-types) section of the [Java Language Specification](doc:java-language-specification). For decimal values, this data type is generally the default choice. As mentioned above, this data type should never be used for precise values, such as currency.
Expand Down