Java Basic


  1. Which system property stores installation directory of JRE?











  1. View Hint View Answer Discuss in Forum

    NA

    Correct Option: B

    java.home is the installation directory of Java Runtime Environment.


  1. What does System.getProperty(“variable”) return?











  1. View Hint View Answer Discuss in Forum

    NA

    Correct Option: A

    System.getProperty(“variable”) returns null value. Because, variable is not a property and if property does not exist, this method returns null value.



  1. Which of these package is used for text formatting in Java programming language?











  1. View Hint View Answer Discuss in Forum

    NA

    Correct Option: D

    java.text allows formatting, searching and manipulating text.


  1. How to read a classpath file?











  1. View Hint View Answer Discuss in Forum

    NA

    Correct Option: A

    This method can be used to load files using relative path to the package of the class.



  1. Which environment variable is used to set java path?











  1. View Hint View Answer Discuss in Forum

    NA

    Correct Option: D

    JAVA_HOME is used to store a path to the java installation.