mirror of
https://github.com/freeCodeCamp/freeCodeCamp.git
synced 2025-12-19 10:07:46 -05:00
fix(curriculum): Update java code blocks to become csharp (#64551)
Co-authored-by: Huyen Nguyen <25715018+huyenltnguyen@users.noreply.github.com>
This commit is contained in:
@@ -180,11 +180,11 @@ let error = 404; // JavaScript treats error as a number
|
||||
error = "Not Found"; // JavaScript now treats error as a string
|
||||
```
|
||||
|
||||
- Other languages, like Java, that are not dynamically typed would result in an error:
|
||||
- Other languages, like C#, that are not dynamically typed would result in an error:
|
||||
|
||||
```java
|
||||
```csharp
|
||||
int error = 404; // value must always be an integer
|
||||
error = "Not Found"; // This would cause an error in Java
|
||||
error = "Not Found"; // This would cause an error in C#
|
||||
```
|
||||
|
||||
## Using the `typeof` Operator
|
||||
|
||||
@@ -183,11 +183,11 @@ let error = 404; // JavaScript treats error as a number
|
||||
error = "Not Found"; // JavaScript now treats error as a string
|
||||
```
|
||||
|
||||
- Other languages, like Java, that are not dynamically typed would result in an error:
|
||||
- Other languages, like C#, that are not dynamically typed would result in an error:
|
||||
|
||||
```java
|
||||
```csharp
|
||||
int error = 404; // value must always be an integer
|
||||
error = "Not Found"; // This would cause an error in Java
|
||||
error = "Not Found"; // This would cause an error in C#
|
||||
```
|
||||
|
||||
## Using the `typeof` Operator
|
||||
|
||||
Reference in New Issue
Block a user