Skip to content

Commit 63435e1

Browse files
authored
Merge pull request #20 from kabutz/master
"32 bits" changed to "32-bit"
2 parents ed85d5d + c384752 commit 63435e1

9 files changed

+31
-31
lines changed

chapter00-genesis.jsh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ System.out.println("the value of colorName is " + colorName);
3131

3232
// ## A record is a user defined type
3333
// here Light is defined as containing two components: a color (typed as a String) and
34-
// an intensity (typed as a 64 bits floating number double).
34+
// an intensity (typed as a 64-bit floating number double).
3535
record Light(String color, double intensity) {}
3636

3737
// ### Object creation with `new`

chapter01-basic_types.jsh

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
// # Basic Types
66
// Java has two kinds of type,
77
// - primitive types that are directly mapped to CPU basic types
8-
// - reference types that address of the object in memory
8+
// - reference types that have the address of the object in memory
99

1010
// ## Primitive types
1111
// primitive types, written in lower case, have no method
@@ -17,25 +17,25 @@ var anotherResult = false;
1717
// ### char (character)
1818
var firstLetter = 'j';
1919

20-
// ### int (signed 32 bits integer)
20+
// ### int (signed 32-bit integer)
2121
var numberOfLegs = 2;
2222

23-
// ### double (64 bits floating point)
23+
// ### double (64-bit floating point)
2424
var cost = 3.78;
2525

2626
// ### long and float
2727
// some more exotic types that requires a suffix (`L` or `f`)
28-
// long (64 bits integers) and float (32 bits floating point numbers)
28+
// long (64-bit integers) and float (32-bit floating point numbers)
2929
var longValue = 123L;
3030
var floatValue = 123.5f;
3131

3232
// ### byte and short
33-
// you also have byte (a signed 8 bits integer) and short (a signed 16 bits short integer)
34-
// that are only useful to take less memory when defining an object
33+
// you also have byte (a signed 8-bit integer) and short (a signed 16-bit short integer)
34+
// that are only useful to use less memory when defining an object
3535
record CompactHeader(byte tag, short version) {}
3636

37-
// when used in variables, they are promoted to 32 bits integer
38-
// in the following code result is a 32 bits integer (so an int)
37+
// when used in variables, they are promoted to a 32-bit integer.
38+
// In the following code, `result` is a 32-bit integer (so an int)
3939
short value = 12;
4040
var result = value + value;
4141

chapter04-numbers.jsh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
// # Numbers
66
// This chapter in not specific to Java but more on how integers and floating point numbers
7-
// works on CPUs like Intel 64 bits or ARM 64 bits.
7+
// work on CPUs like Intel 64-bit or ARM 64-bit.
88

99

1010
// ## Integers
@@ -65,7 +65,7 @@ System.out.println(0.1 + 0.2);
6565
// so you may think the value is fully represented that but that's just an illusion
6666
System.out.println(1.0 / 3.0);
6767

68-
// On way to see the trick is to ask a float, a 32 bits, to be printed as a double, 64 bits.
68+
// On way to see the trick is to ask a float (32-bit), to be printed as a double (64-bit).
6969
System.out.println(1.0f / 3.0f);
7070
System.out.println(Float.toString(1.0f / 3.0f));
7171
System.out.println(Double.toString(1.0f / 3.0f)); // damn i'm unmasked

guide/chapter00-genesis.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ System.out.println("the value of colorName is " + colorName);
3737

3838
## A record is a user defined type
3939
here Light is defined as containing two components: a color (typed as a String) and
40-
an intensity (typed as a 64 bits floating number double).
40+
an intensity (typed as a 64-bit floating number double).
4141
```java
4242
record Light(String color, double intensity) {}
4343
```

guide/chapter01-basic_types.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# Basic Types
22
Java has two kinds of type,
33
- primitive types that are directly mapped to CPU basic types
4-
- reference types that address of the object in memory
4+
- reference types that have the address of the object in memory
55

66
## Primitive types
77
primitive types, written in lower case, have no method
@@ -17,33 +17,33 @@ var anotherResult = false;
1717
var firstLetter = 'j';
1818
```
1919

20-
### int (signed 32 bits integer)
20+
### int (signed 32-bit integer)
2121
```java
2222
var numberOfLegs = 2;
2323
```
2424

25-
### double (64 bits floating point)
25+
### double (64-bit floating point)
2626
```java
2727
var cost = 3.78;
2828
```
2929

3030
### long and float
3131
some more exotic types that requires a suffix (`L` or `f`)
32-
long (64 bits integers) and float (32 bits floating point numbers)
32+
long (64-bit integers) and float (32-bit floating point numbers)
3333
```java
3434
var longValue = 123L;
3535
var floatValue = 123.5f;
3636
```
3737

3838
### byte and short
39-
you also have byte (a signed 8 bits integer) and short (a signed 16 bits short integer)
40-
that are only useful to take less memory when defining an object
39+
you also have byte (a signed 8-bit integer) and short (a signed 16-bit short integer)
40+
that are only useful to use less memory when defining an object
4141
```java
4242
record CompactHeader(byte tag, short version) {}
4343
```
4444

45-
when used in variables, they are promoted to 32 bits integer
46-
in the following code result is a 32 bits integer (so an int)
45+
when used in variables, they are promoted to a 32-bit integer.
46+
In the following code, `result` is a 32-bit integer (so an int)
4747
```java
4848
short value = 12;
4949
var result = value + value;

guide/chapter04-numbers.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Numbers
22
This chapter in not specific to Java but more on how integers and floating point numbers
3-
works on CPUs like Intel 64 bits or ARM 64 bits.
3+
work on CPUs like Intel 64-bit or ARM 64-bit.
44

55

66
## Integers
@@ -81,7 +81,7 @@ so you may think the value is fully represented that but that's just an illusion
8181
System.out.println(1.0 / 3.0);
8282
```
8383

84-
On way to see the trick is to ask a float, a 32 bits, to be printed as a double, 64 bits.
84+
On way to see the trick is to ask a float (32-bit), to be printed as a double (64-bit).
8585
```java
8686
System.out.println(1.0f / 3.0f);
8787
System.out.println(Float.toString(1.0f / 3.0f));

jupyter/chapter00-genesis.ipynb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@
7878
{
7979
"cell_type": "markdown",
8080
"metadata": {},
81-
"source": ["## A record is a user defined type\n", "here Light is defined as containing two components: a color (typed as a String) and\n", "an intensity (typed as a 64 bits floating number double).\n"]
81+
"source": ["## A record is a user defined type\n", "here Light is defined as containing two components: a color (typed as a String) and\n", "an intensity (typed as a 64-bit floating number double).\n"]
8282
}
8383
,
8484
{

jupyter/chapter01-basic_types.ipynb

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"cells": [{
33
"cell_type": "markdown",
44
"metadata": {},
5-
"source": ["# Basic Types\n", "Java has two kinds of type,\n", "- primitive types that are directly mapped to CPU basic types\n", "- reference types that address of the object in memory\n"]
5+
"source": ["# Basic Types\n", "Java has two kinds of type,\n", "- primitive types that are directly mapped to CPU basic types\n", "- reference types that have the address of the object in memory\n"]
66
}
77
,
88
{
@@ -42,7 +42,7 @@
4242
{
4343
"cell_type": "markdown",
4444
"metadata": {},
45-
"source": ["### int (signed 32 bits integer)\n"]
45+
"source": ["### int (signed 32-bit integer)\n"]
4646
}
4747
,
4848
{
@@ -56,7 +56,7 @@
5656
{
5757
"cell_type": "markdown",
5858
"metadata": {},
59-
"source": ["### double (64 bits floating point)\n"]
59+
"source": ["### double (64-bit floating point)\n"]
6060
}
6161
,
6262
{
@@ -70,7 +70,7 @@
7070
{
7171
"cell_type": "markdown",
7272
"metadata": {},
73-
"source": ["### long and float\n", "some more exotic types that requires a suffix (`L` or `f`)\n", "long (64 bits integers) and float (32 bits floating point numbers)\n"]
73+
"source": ["### long and float\n", "some more exotic types that requires a suffix (`L` or `f`)\n", "long (64-bit integers) and float (32-bit floating point numbers)\n"]
7474
}
7575
,
7676
{
@@ -84,7 +84,7 @@
8484
{
8585
"cell_type": "markdown",
8686
"metadata": {},
87-
"source": ["### byte and short\n", "you also have byte (a signed 8 bits integer) and short (a signed 16 bits short integer)\n", "that are only useful to take less memory when defining an object\n"]
87+
"source": ["### byte and short\n", "you also have byte (a signed 8-bit integer) and short (a signed 16-bit short integer)\n", "that are only useful to use less memory when defining an object\n"]
8888
}
8989
,
9090
{
@@ -98,7 +98,7 @@
9898
{
9999
"cell_type": "markdown",
100100
"metadata": {},
101-
"source": ["when used in variables, they are promoted to 32 bits integer\n", "in the following code result is a 32 bits integer (so an int)\n"]
101+
"source": ["when used in variables, they are promoted to a 32-bit integer.\n", "In the following code, `result` is a 32-bit integer (so an int)\n"]
102102
}
103103
,
104104
{

jupyter/chapter04-numbers.ipynb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"cells": [{
33
"cell_type": "markdown",
44
"metadata": {},
5-
"source": ["# Numbers\n", "This chapter in not specific to Java but more on how integers and floating point numbers\n", "works on CPUs like Intel 64 bits or ARM 64 bits.\n"]
5+
"source": ["# Numbers\n", "This chapter in not specific to Java but more on how integers and floating point numbers\n", "work on CPUs like Intel 64-bit or ARM 64-bit.\n"]
66
}
77
,
88
{
@@ -160,7 +160,7 @@
160160
{
161161
"cell_type": "markdown",
162162
"metadata": {},
163-
"source": ["On way to see the trick is to ask a float, a 32 bits, to be printed as a double, 64 bits.\n"]
163+
"source": ["On way to see the trick is to ask a float (32-bit), to be printed as a double (64-bit).\n"]
164164
}
165165
,
166166
{

0 commit comments

Comments
 (0)