1. package com.udayan.ocp;
2.
3. import java.util.stream.Stream;
4.
5. public class Test {
6. public static void main(String[] args) {
7. Stream
8. stream.sorted().forEach(System.out::println);
9. }
10. }
Which of the following needs to be done, so that output is:
d
cc
bbb
aaaa
1. F:.
2. └───A
3. └───B
4. └───C
5. Book.java
'Book.java' file is available under 'C' directory.
Given code of Test.java file:
1. package com.udayan.ocp;
2.
3. import java.nio.file.Path;
4. import java.nio.file.Paths;
5.
6. public class Test {
7. public static void main(String[] args) {
8. Path file = Paths.get("F:\\A\\B\\Book.java");
9. System.out.println(file.toAbsolutePath());
10. }
11. }
What will be the result of compiling and executing Test class?
© Copyrights DumpsEngine 2025. All Rights Reserved
We use cookies to ensure your best experience. So we hope you are happy to receive all cookies on the DumpsEngine.