AllRounder.ai
Chapters in this course

Enrol to start learning

Reading is open to everyone. Enrolling is free, and it is what unlocks the audio lessons, practice tests and progress tracking.

Enrol free

29.3. JavaScript Engine in Java

  • This section

    Practice test

    12 questions on this section. Wrong answers show you what to read again.

    Sign up to take it
  • Whole chapter

    Revision test

    Mixed questions from across the chapter. Your answers get marked.

    Sign up to take it
  • Quick

    Flashcard drill

    3 cards from this lesson. Good the night before a test.

Try these first

  1. 1.

    What was the default JavaScript engine in Java before Nashorn?

    Hint

    Remember, it was developed by Mozilla.

  2. 2.

    What is the Nashorn engine used for?

    Hint

    Think about performance improvements.

  3. 3.

    What JavaScript engine replaced Rhino?

    • Rhino
    • Nashorn
    • GraalVM
    Hint

    It was introduced in Java 8.

  4. 4.

    True or False: Nashorn has been deprecated in Java 11.

    • True
    • False
    Hint

    Remember the transition to newer technologies.

  5. 5.

    Create a simple Nashorn script that computes the factorial of a number passed from Java.

    Hint

    Think recursion when computing factorial.

  6. 6.

    Discuss the implications of transitioning from Nashorn to GraalVM for existing Java applications that use Nashorn.

    Hint

    Consider what advantages GraalVM offers over Nashorn.

Exercises

Total Questions

2

Estimated Time

4 min

Passing Score

70%

Instructions

  • Read each question carefully
  • You can use hints if you need help
  • Complete all questions before submitting

4 more questions available

Enrol free

Quiz

Total Questions

2

Estimated Time

4 min

Passing Score

70%

Instructions

  • Read each question carefully
  • You can use hints if you need help
  • Complete all questions before submitting

2 more questions available

Enrol free

Challenge Problems

Total Questions

2

Estimated Time

4 min

Passing Score

70%

Instructions

  • Read each question carefully
  • You can use hints if you need help
  • Complete all questions before submitting