Node.js questions about modules

  node.js, question

As a coding peasant transferred from java, I want to know that node.js should also have api similar to java for various modules. But I can’t find it, and I want to know what’s the difference between java classes and node.js modules? What are the similarities and differences?

Just before, I was also doing java (although I didn’t use it deeply, I can talk about understanding)

Java platform includes:

  1. Java programming language

  2. Java Class file format

  3. Java application programming interface (API)

  4. Virtual machine (HotSpot, etc.)

Corresponding to node Platform:

  1. ECMAScript

  2. (None)

  3. Node platformAPI

  4. Javascript engine (V8)

Comparison of other concepts:

  • Java package – node module

  • Java maven – node npm

  • Java class-ES6 Class (ES5 simulation class)