Java Basic
- Which system property stores installation directory of JRE?
-
View Hint View Answer Discuss in Forum
NA
Correct Option: B
java.home is the installation directory of Java Runtime Environment.
- What does System.getProperty(“variable”) return?
-
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.
- Which of these package is used for text formatting in Java programming language?
-
View Hint View Answer Discuss in Forum
NA
Correct Option: D
java.text allows formatting, searching and manipulating text.
- How to read a classpath file?
-
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.
- Which environment variable is used to set java path?
-
View Hint View Answer Discuss in Forum
NA
Correct Option: D
JAVA_HOME is used to store a path to the java installation.