Skip to content

Commit c7818e0

Browse files
authored
Update 2023-11-27-find-duplicate-elements-in-array.md
1 parent b2565c0 commit c7818e0

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

‎_posts/java-programs/2023-11-27-find-duplicate-elements-in-array.md

+1-2
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ private static void printDuplicatesByIterating(int[] arr) {
4242

4343
## 2. Find duplicate elements in an array using the sorting method
4444

45-
In this method, we are sorting the first using the Arrays.sort() method. Then, we iterate over an array to check if the next adjacent element is a duplicate or not.
45+
In this method, we are sorting the first using the `Arrays.sort()` method. Then, we iterate over an array to check if the next adjacent element is a duplicate or not.
4646

4747
```java
4848
private static void printDuplicatesBySorting(int[] arr) {
@@ -207,4 +207,3 @@ Duplicate elements in array are :[1, 2, 6, 9]
207207
Finding duplicate elements using the Java 8 Streams method.
208208
Duplicate elements in array are :[1, 2, 6, 9]
209209
```
210-

0 commit comments

Comments
 (0)