Skip to content

Commit 1ad3597

Browse files
committed
chore: finished README.md
1 parent d1da8bb commit 1ad3597

File tree

1 file changed

+12
-1
lines changed

1 file changed

+12
-1
lines changed

lesson_04/evanphilakhong/README.md

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,4 +50,15 @@ public static boolean isPrime(int num) {
5050

5151
## Explanation
5252

53-
The C++ implementation is using a function named `isPrime` that takes a single parameter `num` representing the number the function is checking if it's a prime number or not. The function returns `True` if the number is **Prime**
53+
The **C++** implementation is using a function named `isPrime` that takes a single parameter `num` representing the number the function is checking if it's a prime number or not. The function returns `True` if the number is **Prime**, otherwise it returns `False`.
54+
55+
The **Java** implementation is using a function named `isPrime` that takes a single parameter `num` representing the numer the function is checking if it's a prime number or not. The function returns `True` if the number is **Prime**, otherwise it returns `False`.
56+
57+
### Differences
58+
59+
1. **File Stucture**:
60+
- In **C++**, you have the ability to create a header file to store libraries and function declorations. While Java has no such thing.
61+
- **Java** forces you to work in a `Class` while, **C++** lets you work outside of `Classes`
62+
63+
2. **Syntax**:
64+
- The syntax for printing to the console/output is a little different. **C++** uses `cout` while, **Java** uses `System.out.print();`

0 commit comments

Comments
 (0)