Search Interview Questions | More than 3000 questions in repository. There are more than 900 unanswered questions. Click here and help us by providing the answer. Have a video suggestion. Click Correct / Improve and please let us know. |
|
| ||||
Interview Questions and Answers for 'Path' - 11 question(s) found - Order By Newest | ||||
Frequently asked at Manhattan Associates ( Based on 2 feedback ) | ||||
| ||||
Ans. Its an anonymous method without any declaration. Lambda Expression are useful to write shorthand Code and hence saves the effort of writing lengthy Code. It promotes Developer productivity, Better Readable and Reliable code. | ||||
Sample Code for lambda | ||||
Help us improve. Please let us know the company, where you were asked this question : | ||||
Like Discuss Correct / Improve  java   java8   lambda expression   architecture Asked in 58 Companies expert   frequent | ||||
Try 1 Question(s) Test | ||||
| ||||
Ans. To display the current CLASSPATH variable, use these commands in UNIX (Bourne shell): % echo $CLASSPATH To delete the current contents of the CLASSPATH variable, In UNIX: % unset CLASSPATH; export CLASSPATH To set the CLASSPATH variable, In UNIX: % CLASSPATH=/home/george/java/classes; export CLASSPATH | ||||
Help us improve. Please let us know the company, where you were asked this question : | ||||
Like Discuss Correct / Improve  unix   unix commands   classpath | ||||
| ||||
Ans. It is used to sort collections and arrays of objects using the collections.sort() and java.utils. The objects of the class implementing the Comparable interface can be ordered. | ||||
Help us improve. Please let us know the company, where you were asked this question : | ||||
Like Discuss Correct / Improve  java   collections   comparable interface Asked in 7 Companies intermediate   frequent | ||||
Try 1 Question(s) Test | ||||
| ||||
Ans. CLASSPATH and PATH are the two variables. | ||||
Help us improve. Please let us know the company, where you were asked this question : | ||||
Like Discuss Correct / Improve  java   classpath   path   environment variables   jvm | ||||
| ||||
Ans. PATH is the variable that holds the directories for the OS to look for executables. CLASSPATH is the variable that holds the directories for JVM to look for .class files ( Byte Code ). | ||||
Help us improve. Please let us know the company, where you were asked this question : | ||||
Like Discuss Correct / Improve  java   path   classpath   byte code   jvm   basic interview question Asked in 3 Companies intermediate   rare | ||||
| ||||
Ans. ClassPath is the path where Java looks for class files to resolve the dependencies. For example - If you are using a class "xyz" in your code and have specified the respective import, Where should Java look for the definition of xyz. Java determines using the class path settings. | ||||
Help us improve. Please let us know the company, where you were asked this question : | ||||
Like Discuss Correct / Improve  java   classpath   classpath settings Asked in 2 Companies | ||||
| ||||
Ans. Classpath is the parameter for JVM to look for java classes ( .class files ) that are to be looad by class loader | ||||
Help us improve. Please let us know the company, where you were asked this question : | ||||
Like Discuss Correct / Improve  classpath Asked in 1 Companies basic | ||||
| ||||
Ans. It means that the respective folder is not looked upon by Java to look for java or resource files and hence not being included as part of build.It needs to be added to Java Build Path. | ||||
Help us improve. Please let us know the company, where you were asked this question : | ||||
Like Discuss Correct / Improve  build path.build class path | ||||
| ||||
Ans. PATH, CLASSPATH and JAVA_HOME | ||||
Help us improve. Please let us know the company, where you were asked this question : | ||||
Like Discuss Correct / Improve  environment variables  path  classpath  java_home Asked in 3 Companies basic   frequent | ||||
| ||||
Ans. If the number of params is quite large , I would prefer to either split it with majority of it in query params or all in query params. If the params are all mandatory , I would keep it as path params. If it's optional , I would keep it as query param so as to keep consistent base url. If we don't require the param name , then they can be kept as path params as query params necessitates the usage of param name. | ||||
Help us improve. Please let us know the company, where you were asked this question : | ||||
Like Discuss Correct / Improve  Web Service  Get service  path vs query param  Rest  query param  path param | ||||
| ||||
Ans. No, it's optional as the name of path param required is same as method param name in this case. Even the declaration as following should work - @Path("/{employeeId}") public String employeeInfo(@PathParam Long employeeId){ } | ||||
Help us improve. Please let us know the company, where you were asked this question : | ||||
Like Discuss Correct / Improve  Web Service  Get service  Rest  path param | ||||