Home / CSE / Javascript - CS :: Server Side and Client Side Scripting

CSE :: Javascript - CS

  1. Rhino is originated by

  2. A.

     Microsoft

    B.

     Mozilla

    C.

     Apple

    D.

     None of the mentioned


  3. Which of the following are global functions that are not part of core JavaScript?

  4. A.

     spawn(f);

    B.

     trim();

    C.

     exult();

    D.

     none of the mentioned


  5. Which of the following reads the textual contents of a URL and returns as a string?

  6. A.

     spawn(f);

    B.

     load(filename,…);

    C.

     readFile(file);

    D.

     readUrl(url);


  7. Which Rhino command quits Rhino environment?

  8. A.

     terminate()

    B.

     exit()

    C.

     quit()

    D.

     close()


  9. Which is a useful way to try out small and simple Rhino programs and one-liners?

  10. A.

     Starting an interative shell

    B.

     Starting a one to one shell

    C.

     Creating a thread to do simple programs

    D.

     None of the mentioned


  11. Which is a more formal way of importing packages and classes as JavaScript objects?

  12. A.

     import(java.util.*);

    B.

     importClass(java.util.*);

    C.

     import.Class(java.util.*);

    D.

     Class.import(java.util.*);


  • Consider the following code snippet

    var f = new java.io.File("/tmp/test");

    var out = new java.io.FileWriter(f);

    out instanceof java.io.Reader

    What will be the output for the above code snippet?

  • A.

     Error

    B.

     True

    C.

     Exception

    D.

     False


  • What does Rhino do when the getter and setter methods exist?

  • A.

     It becomes JavaScript properties

    B.

     Java classes are used to avoid them

    C.

     Java classes & JavaScript properties

    D.

     None of the mentioned


  • The JavaScript classes can be instantiated using _____ operator?

  • A.

     create

    B.

     new

    C.

     instantiate

    D.

     create.new


  • The new Java arrays can be created into a JavaScript programs using which of the following classes?

  • A.

     java.Array

    B.

     java.lang.*

    C.

     java.lang.Array

    D.

     java.lang.reflect.Array