Skip to content

Commit 707c930

Browse files
committed
Update sysout line in examples
1 parent cda18d7 commit 707c930

File tree

4 files changed

+8
-5
lines changed

4 files changed

+8
-5
lines changed

java-programs/largest-element-in-an-array/LargestElementInArrayUsingArrays.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,8 @@ public static void main(String[] args) {
1717
int[] arr = {2, 5, 9, 8, 11};
1818

1919
int largestElement = getLargest(arr);
20-
System.out.println("Largest element in an array 'arr' using Array.sort() is :"+ largestElement);
21-
20+
System.out.println("Largest element in an array 'arr' "
21+
+ "using Array.sort() is :"+ largestElement);
2222
}
2323

2424
private static int getLargest(int[] arr) {

java-programs/largest-element-in-an-array/LargestElementInArrayUsingStream.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,8 @@ public static void main(String[] args) {
1616
int[] arr = {2, 5, 9, 8, 11};
1717

1818
int largestElement = getLargest(arr);
19-
System.out.println("Largest element in an array 'arr' using Java 8 Streams API is :"+ largestElement);
19+
System.out.println("Largest element in an array 'arr'"
20+
+ "using Java 8 Streams API is :"+ largestElement);
2021
}
2122

2223
private static int getLargest(int[] arr) {

java-programs/second-largest-element-in-an-array/SecondLargestElementInArray.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,8 @@ public static void main(String[] args) {
1111
int[] arr = {2, 5, 9, 8, 11, 18, 13};
1212

1313
int secondLargest = getSecondLargest(arr);
14-
System.out.println("The second largest element in an array 'arr' is :"+ secondLargest);
14+
System.out.println("The second largest element in "
15+
+ "an array 'arr'is :"+ secondLargest);
1516
}
1617

1718
private static int getSecondLargest(int[] arr) {

java-programs/second-largest-element-in-an-array/SecondLargestElementInArrayUsingArrays.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,8 @@ public static void main(String[] args) {
1414
int[] arr = {2, 5, 9, 8, 11, 18, 13};
1515

1616
int secondLargest = getSecondLargest(arr);
17-
System.out.println("The second largest element in an array 'arr' is using Arrays.sort() :"+ secondLargest);
17+
System.out.println("The second largest element in"
18+
+ "an array 'arr' is using Arrays.sort() :"+ secondLargest);
1819
}
1920

2021
private static int getSecondLargest(int[] arr) {

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy