You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: jupyter/chapter00-genesis.ipynb
+5-5
Original file line number
Diff line number
Diff line change
@@ -8,7 +8,7 @@
8
8
{
9
9
"cell_type": "markdown",
10
10
"metadata": {},
11
-
"source": ["## Types\n", "A primitive type is stored as value while an object is stored as\n", "a reference (the address of the object in memory).\n", "In Java, `var` create a new variable\n"]
11
+
"source": ["## Types\n", "A primitive type is stored as value while an object is stored as\n", "a reference (the address of the object in memory).\n", "In Java, `var` creates a new variable\n"]
12
12
}
13
13
,
14
14
{
@@ -78,7 +78,7 @@
78
78
{
79
79
"cell_type": "markdown",
80
80
"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"]
82
82
}
83
83
,
84
84
{
@@ -92,7 +92,7 @@
92
92
{
93
93
"cell_type": "markdown",
94
94
"metadata": {},
95
-
"source": ["### Object creation with `new`\n", "To create an object in memory, we use the operator `new` followed by the value of each record components\n", "the following instruction create a Light with \"blue\" as color and 1.0 as intensity.\n"]
95
+
"source": ["### Object creation with `new`\n", "To create an object in memory, we use the operator `new` followed by the value of each record component.\n", "The following instruction creates a Light with \"blue\" as color and 1.0 as intensity.\n"]
96
96
}
97
97
,
98
98
{
@@ -140,7 +140,7 @@
140
140
{
141
141
"cell_type": "markdown",
142
142
"metadata": {},
143
-
"source": ["### equals()\n", "In Java, you can ask if two objects are equals, using the method equals(Object).\n", "The return value is a boolean (a primitive type that is either true or false).\n"]
143
+
"source": ["### equals()\n", "In Java, you can ask if two objects are equal, using the method equals(Object).\n", "The return value is a boolean (a primitive type that is either true or false).\n"]
144
144
}
145
145
,
146
146
{
@@ -168,7 +168,7 @@
168
168
{
169
169
"cell_type": "markdown",
170
170
"metadata": {},
171
-
"source": ["## Summary\n", "A `record` has components that are the parameters used to create an object\n", "To create an object we use the operator `new` followed by the arguments of the\n", "record components in the same order.\n", "To interact with an object, we are using methods that are functions that you\n", "call on an object using the operator `.`.\n", "A Record defines methods to access the value of a component, and also\n", "`toString()` to get the textual representation of an object and\n", "`equals()` and `hashCode()` to test if two objects are equals.\n"]
171
+
"source": ["## Summary\n", "A `record` has components that are the parameters used to create an object\n", "To create an object we use the operator `new` followed by the arguments of the\n", "record components in the same order.\n", "To interact with an object, we are using methods that are functions that you\n", "call on an object using the operator `.`.\n", "A Record defines methods to access the value of a component, and also\n", "`toString()` to get the textual representation of an object and\n", "`equals()` and `hashCode()` to test if two objects are equal.\n"]
Copy file name to clipboardExpand all lines: jupyter/chapter01-basic_types.ipynb
+6-6
Original file line number
Diff line number
Diff line change
@@ -2,7 +2,7 @@
2
2
"cells": [{
3
3
"cell_type": "markdown",
4
4
"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"]
"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"]
74
74
}
75
75
,
76
76
{
@@ -84,7 +84,7 @@
84
84
{
85
85
"cell_type": "markdown",
86
86
"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"]
88
88
}
89
89
,
90
90
{
@@ -98,7 +98,7 @@
98
98
{
99
99
"cell_type": "markdown",
100
100
"metadata": {},
101
-
"source": ["when used in variables, they are promoted to 32 bits integer\n", "in the following coderesult 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"]
Copy file name to clipboardExpand all lines: jupyter/chapter04-numbers.ipynb
+2-2
Original file line number
Diff line number
Diff line change
@@ -2,7 +2,7 @@
2
2
"cells": [{
3
3
"cell_type": "markdown",
4
4
"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"]
6
6
}
7
7
,
8
8
{
@@ -160,7 +160,7 @@
160
160
{
161
161
"cell_type": "markdown",
162
162
"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"]
0 commit comments