├── Java11
├── Java11.iml
├── out
│ └── production
│ │ └── Java11
│ │ ├── Main.class
│ │ └── main
│ │ ├── himash
│ │ ├── Files
│ │ │ └── Illustration_01.class
│ │ ├── Methods$Nested.class
│ │ ├── Methods.class
│ │ ├── Strings
│ │ │ ├── Illustration_01.class
│ │ │ ├── Illustration_02.class
│ │ │ ├── Illustration_03.class
│ │ │ └── Illustration_04.class
│ │ └── lamdas
│ │ │ └── Illustration_01.class
│ │ └── resources
│ │ └── names.txt
└── src
│ ├── Main.java
│ └── main
│ ├── himash
│ ├── Files
│ │ └── Illustration_01.java
│ ├── Methods.java
│ ├── Strings
│ │ ├── Illustration_01.java
│ │ ├── Illustration_02.java
│ │ ├── Illustration_03.java
│ │ └── Illustration_04.java
│ └── lamdas
│ │ └── Illustration_01.java
│ └── resources
│ └── names.txt
└── README.md
/Java11/Java11.iml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/Java11/out/production/Java11/Main.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/himash79/Java-11-features/9bf787d85c3efef2d3125f70dfdb07418c639b6a/Java11/out/production/Java11/Main.class
--------------------------------------------------------------------------------
/Java11/out/production/Java11/main/himash/Files/Illustration_01.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/himash79/Java-11-features/9bf787d85c3efef2d3125f70dfdb07418c639b6a/Java11/out/production/Java11/main/himash/Files/Illustration_01.class
--------------------------------------------------------------------------------
/Java11/out/production/Java11/main/himash/Methods$Nested.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/himash79/Java-11-features/9bf787d85c3efef2d3125f70dfdb07418c639b6a/Java11/out/production/Java11/main/himash/Methods$Nested.class
--------------------------------------------------------------------------------
/Java11/out/production/Java11/main/himash/Methods.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/himash79/Java-11-features/9bf787d85c3efef2d3125f70dfdb07418c639b6a/Java11/out/production/Java11/main/himash/Methods.class
--------------------------------------------------------------------------------
/Java11/out/production/Java11/main/himash/Strings/Illustration_01.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/himash79/Java-11-features/9bf787d85c3efef2d3125f70dfdb07418c639b6a/Java11/out/production/Java11/main/himash/Strings/Illustration_01.class
--------------------------------------------------------------------------------
/Java11/out/production/Java11/main/himash/Strings/Illustration_02.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/himash79/Java-11-features/9bf787d85c3efef2d3125f70dfdb07418c639b6a/Java11/out/production/Java11/main/himash/Strings/Illustration_02.class
--------------------------------------------------------------------------------
/Java11/out/production/Java11/main/himash/Strings/Illustration_03.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/himash79/Java-11-features/9bf787d85c3efef2d3125f70dfdb07418c639b6a/Java11/out/production/Java11/main/himash/Strings/Illustration_03.class
--------------------------------------------------------------------------------
/Java11/out/production/Java11/main/himash/Strings/Illustration_04.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/himash79/Java-11-features/9bf787d85c3efef2d3125f70dfdb07418c639b6a/Java11/out/production/Java11/main/himash/Strings/Illustration_04.class
--------------------------------------------------------------------------------
/Java11/out/production/Java11/main/himash/lamdas/Illustration_01.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/himash79/Java-11-features/9bf787d85c3efef2d3125f70dfdb07418c639b6a/Java11/out/production/Java11/main/himash/lamdas/Illustration_01.class
--------------------------------------------------------------------------------
/Java11/out/production/Java11/main/resources/names.txt:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/himash79/Java-11-features/9bf787d85c3efef2d3125f70dfdb07418c639b6a/Java11/out/production/Java11/main/resources/names.txt
--------------------------------------------------------------------------------
/Java11/src/Main.java:
--------------------------------------------------------------------------------
1 | public class Main {
2 | public static void main(String[] args) {
3 | System.out.println("Hello world!");
4 | }
5 | }
--------------------------------------------------------------------------------
/Java11/src/main/himash/Files/Illustration_01.java:
--------------------------------------------------------------------------------
1 | package main.himash.Files;
2 |
3 | import java.io.IOException;
4 | import java.io.Serializable;
5 | import java.nio.file.Files;
6 | import java.nio.file.Path;
7 | import java.nio.file.Paths;
8 | import java.util.logging.Logger;
9 |
10 | public class Illustration_01 {
11 |
12 | public static void main(String[] args) throws IOException {
13 |
14 | Logger log = Logger.getLogger(main.himash.Strings.Illustration_01.class.getName());
15 |
16 | // Path filePath = Files.writeString(Files.createTempFile(tempDir, "demo", ".txt"), "Sample text"); // create file iif you want
17 | Path filePath = Files.writeString(Paths.get("E:/Github projects/Java11/src/main/resources/names.txt"), "HELLO MY WORLD");
18 | String fileContent = Files.readString(filePath);
19 | log.info(fileContent);
20 |
21 | }
22 |
23 | }
24 |
--------------------------------------------------------------------------------
/Java11/src/main/himash/Methods.java:
--------------------------------------------------------------------------------
1 | package main.himash;
2 |
3 | import java.lang.reflect.InvocationTargetException;
4 | import java.lang.reflect.Method;
5 |
6 | public class Methods {
7 | public void myPublic() {
8 | }
9 |
10 | private void myPrivate() {
11 | }
12 |
13 | class Nested {
14 |
15 | public void nestedPublic() {
16 | myPrivate();
17 | }
18 | }
19 |
20 | public static void main(String[] args) throws NoSuchMethodException, InvocationTargetException, IllegalAccessException {
21 |
22 | Methods ob = new Methods();
23 |
24 | Method method = ob.getClass().getDeclaredMethod("myPrivate");
25 | method.invoke(ob);
26 |
27 | }
28 |
29 | }
30 |
31 |
32 |
--------------------------------------------------------------------------------
/Java11/src/main/himash/Strings/Illustration_01.java:
--------------------------------------------------------------------------------
1 | package main.himash.Strings;
2 |
3 | import java.util.logging.Logger;
4 |
5 | public class Illustration_01 {
6 |
7 | public static void main(String[] args) {
8 |
9 | Logger log = Logger.getLogger(Illustration_01.class.getName());
10 |
11 | String value_01 = "";
12 | String value_02 = " ";
13 | String value_03 = "Hello my world";
14 |
15 | log.info(String.valueOf(value_01.isBlank()));
16 | log.info(String.valueOf(value_02.isBlank()));
17 | log.info(String.valueOf(value_03.isBlank()));
18 |
19 | }
20 |
21 | }
22 |
--------------------------------------------------------------------------------
/Java11/src/main/himash/Strings/Illustration_02.java:
--------------------------------------------------------------------------------
1 | package main.himash.Strings;
2 |
3 | import java.util.List;
4 | import java.util.logging.Logger;
5 | import java.util.stream.Collectors;
6 |
7 | public class Illustration_02 {
8 |
9 | public static void main(String[] args) {
10 |
11 | Logger log = Logger.getLogger(Illustration_01.class.getName());
12 |
13 | String valueList = "JD\nJD\nJD";
14 | List list = valueList.lines().collect(Collectors.toList());
15 | log.info(String.valueOf(list));
16 |
17 | }
18 |
19 | }
20 |
--------------------------------------------------------------------------------
/Java11/src/main/himash/Strings/Illustration_03.java:
--------------------------------------------------------------------------------
1 | package main.himash.Strings;
2 |
3 | import java.util.logging.Logger;
4 |
5 | public class Illustration_03 {
6 |
7 | public static void main(String[] args) {
8 |
9 | Logger log = Logger.getLogger(Illustration_01.class.getName());
10 |
11 | String value = " JD ";
12 | log.info(value.strip());
13 | log.info("String length 1 : " + String.valueOf(value.strip().length()));
14 | log.info(value.stripLeading());
15 | log.info("String length 2 : " + String.valueOf(value.stripLeading().length()));
16 | log.info(value.stripTrailing());
17 | log.info("String length 3 : " + String.valueOf(value.stripTrailing().length()));
18 |
19 | }
20 |
21 | }
22 |
--------------------------------------------------------------------------------
/Java11/src/main/himash/Strings/Illustration_04.java:
--------------------------------------------------------------------------------
1 | package main.himash.Strings;
2 |
3 | import java.util.logging.Logger;
4 |
5 | public class Illustration_04 {
6 |
7 | public static void main(String[] args) {
8 |
9 | Logger log = Logger.getLogger(Illustration_01.class.getName());
10 |
11 | String value = "Hello my world";
12 | log.info(value.concat(" ").repeat(2));
13 |
14 | }
15 |
16 | }
17 |
--------------------------------------------------------------------------------
/Java11/src/main/himash/lamdas/Illustration_01.java:
--------------------------------------------------------------------------------
1 | package main.himash.lamdas;
2 |
3 | import java.util.Arrays;
4 | import java.util.List;
5 | import java.util.logging.Logger;
6 | import java.util.stream.Collectors;
7 |
8 | public class Illustration_01 {
9 |
10 | public static void main(String[] args) {
11 |
12 | List list = Arrays.asList("January","February","March");
13 |
14 | List conList = list.stream().map((var month) -> month.toUpperCase()).collect(Collectors.toList());
15 |
16 | System.out.println(conList);
17 |
18 | }
19 |
20 | }
21 |
--------------------------------------------------------------------------------
/Java11/src/main/resources/names.txt:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/himash79/Java-11-features/9bf787d85c3efef2d3125f70dfdb07418c639b6a/Java11/src/main/resources/names.txt
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # Java 11 Features
2 |
3 | Includes Java 11 related features.
4 |
5 | ## Requirements
6 |
7 | 01) Java 11
8 |
9 | ## Project setup
10 |
11 | 01) Clone the project
12 |
13 | https://github.com/himash79/Java-11-features.git
14 |
15 | 02) Figure out the features about Methods, String...
16 |
--------------------------------------------------------------------------------