Interview Questions and Answers for 'Path' | Search Interview Question - javasearch.buggybread.com
Javasearch.buggybread.com

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.
Label / Company      Label / Company / Text

   



Interview Questions and Answers for 'Path' - 11 question(s) found - Order By Newest

Frequently asked at Manhattan Associates ( Based on 2 feedback )
  Q1. What is a Lambda Expression ? What's its use ?Core Java
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


 Q2. How to display and set the Class path in Unix ?
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


  Q3. What is Comparable Interface?Core Java
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


 Q4. What environment variables do I need to set on my machine in order to be able to run Java programs?
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


 Q5. Difference between PATH and CLASSPATH ?Operating System
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


 Q6. What is classpath in a project?Core Java
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


 Q7. What is a classpath in Java ?Core Java
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


 Q8. What is meant by following error ?

Source folder is not on the Java build class path
Core Java
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


 Q9. Which environment variables do we need to set in order to run Java programs?Core Java
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


 Q10. If given a choice , which one would you prefer to send params to the Get service , path params or query param ?Web Service
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


 Q11. Is it necessary to specify "employeeId" with @PathParam("employeeId") in this case,

@Path("/{employeeId}")
public String employeeInfo(@PathParam("employeeId") Long employeeId){
}
Rest
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



Help us and Others Improve. Please let us know the questions asked in any of your previous interview.

Any input from you will be highly appreciated and It will unlock the application for 10 more requests.

Company Name:
Questions Asked: