Skip to content

Commit 6bd5755

Browse files
committed
Update README.md
1 parent 6e33fc9 commit 6bd5755

File tree

1 file changed

+23
-21
lines changed

1 file changed

+23
-21
lines changed

README.md

Lines changed: 23 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@
4141
* [Java Abstraction](#-17-java-abstraction)
4242
* [Java Interfaces](#-18-java-interfaces)
4343
* [Java Encapsulation](#-19-java-encapsulation)
44-
* [Miscellaneous](#-20-react-miscellaneous)
44+
* [Miscellaneous](#-20-miscellaneous)
4545

4646
<br/>
4747

@@ -85,6 +85,22 @@
8585
<b><a href="#related-topics">↥ back to top</a></b>
8686
</div>
8787

88+
## Q. What is Nashorn?
89+
90+
**Nashorn** is a JavaScript engine developed in Java by Oracle. Designed to provide the ability to embed JavaScript code in Java applications. Compared to Rhino , which is supported by the Mozilla Foundation, Nashorn provides 2 to 10 times better performance, as it compiles code and transfers bytecode to the Java virtual machine directly in memory. Nashorn can compile JavaScript code and generate Java classes that are loaded with a special loader. It is also possible to call Java code directly from JavaScript.
91+
92+
<div align="right">
93+
<b><a href="#related-topics">↥ back to top</a></b>
94+
</div>
95+
96+
## Q. What is jjs?
97+
98+
`jjs` - This is a command line utility that allows you to execute JavaScript programs directly in the console.
99+
100+
<div align="right">
101+
<b><a href="#related-topics">↥ back to top</a></b>
102+
</div>
103+
88104
## Q. In Java, How many ways you can take input from the console?
89105

90106
In Java, there are three different ways for reading input from the user in the command line environment ( console ).
@@ -893,14 +909,16 @@ The default methods of the implemented functional interface are not allowed to b
893909

894910
If the method existing in the class already does everything that is necessary, then you can use the method reference mechanism (method reference) to directly pass this method. The result will be exactly the same as in the case of defining a lambda expression that calls this method.
895911

912+
**Example:**
913+
896914
```java
897-
private interface Measurable {
898-
public int length ( String string );
915+
private interface Measurable {
916+
public int length(String string);
899917
}
900918

901919
public static void main ( String [] args) {
902-
Measurable a = String::length;
903-
System.out.println(a.length("abc"));
920+
Measurable a = String::length;
921+
System.out.println(a.length("abc"));
904922
}
905923
```
906924

@@ -4530,22 +4548,6 @@ To define a repeatable annotation, you must create a container annotation for th
45304548
<b><a href="#related-topics">↥ back to top</a></b>
45314549
</div>
45324550
4533-
## Q. What is Nashorn?
4534-
4535-
**Nashorn** is a JavaScript engine developed in Java by Oracle. Designed to provide the ability to embed JavaScript code in Java applications. Compared to Rhino , which is supported by the Mozilla Foundation, Nashorn provides 2 to 10 times better performance, as it compiles code and transfers bytecode to the Java virtual machine directly in memory. Nashorn can compile JavaScript code and generate Java classes that are loaded with a special loader. It is also possible to call Java code directly from JavaScript.
4536-
4537-
<div align="right">
4538-
<b><a href="#related-topics">↥ back to top</a></b>
4539-
</div>
4540-
4541-
## Q. What is jjs?
4542-
4543-
`jjs` - This is a command line utility that allows you to execute JavaScript programs directly in the console.
4544-
4545-
<div align="right">
4546-
<b><a href="#related-topics">↥ back to top</a></b>
4547-
</div>
4548-
45494551
## Q. What class appeared in Java 8 for encoding / decoding data?
45504552
45514553
`Base64`- a thread-safe class that implements a data encoder and decoder using a base64 encoding scheme according to RFC 4648 and RFC 2045 .

0 commit comments

Comments
 (0)