From 553c5acab6751339b3e4635b4fef0512f7659306 Mon Sep 17 00:00:00 2001
From: Habiba Sorour
Date: Fri, 24 Jul 2026 16:55:45 +0300
Subject: [PATCH] fixed typos in chapter 3
---
source/ch3_javadatatypes.ptx | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/source/ch3_javadatatypes.ptx b/source/ch3_javadatatypes.ptx
index e33d9b1..ffca06d 100644
--- a/source/ch3_javadatatypes.ptx
+++ b/source/ch3_javadatatypes.ptx
@@ -87,7 +87,7 @@
- A data type fundamentally defines a set of values and the operations you can perform on them. For instance, you can do math with int and double values, but not with boolean values. This is simlar to Python, where you can perform arithmetic on integers and floats, but not on booleans or strings.
+ A data type fundamentally defines a set of values and the operations you can perform on them. For instance, you can do math with int and double values, but not with boolean values. This is similar to Python, where you can perform arithmetic on integers and floats, but not on booleans or strings.
@@ -448,7 +448,7 @@ def main():
count[int(line)] = count[int(line)] + 1
idx = 0
for num in count:
- print(idx, " occured ", num, " times.")
+ print(idx, " occurred ", num, " times.")
idx += 1
main()
@@ -565,7 +565,7 @@ public class Histo {
}
idx = 0;
for(Integer i : count) {
- System.out.println(idx + " occured " + i + " times.");
+ System.out.println(idx + " occurred " + i + " times.");
idx++;
}
}
@@ -691,7 +691,7 @@ public class HistoArray {
}
idx = 0;
for(Integer i : count) {
- System.out.println(idx + " occured " + i + " times.");
+ System.out.println(idx + " occurred " + i + " times.");
idx++;
}
}
@@ -795,7 +795,7 @@ public class HistoMap {
count.put(word,++wordCount);
}
for(String i : count.keySet()) {
- System.out.printf("%-20s occured %5d times\n", i, count.get(i) );
+ System.out.printf("%-20s occurred %5d times\n", i, count.get(i) );
}
}
}