Interview Questions and Answers - Order By Rating This question was recently asked at 'Jefferies'.This question is still unanswered. Can you please provide an answer. Help us improve. Please let us know the company, where you were asked this question : Like Discuss Correct / Improve   Asked in 1 Companies Q242. Difference between Query param and path param ?
This question was recently asked at 'GSpann Technologies, Motorola Solutions'.This question is still unanswered. Can you please provide an answer. Help us improve. Please let us know the company, where you were asked this question : Like Discuss Correct / Improve   Asked in 2 Companies Q243. Write SQL query to join 2 tables ? SQL
Ans. Select * from table1 join Select * from table2 Help us improve. Please let us know the company, where you were asked this question : Like Discuss Correct / Improve  database Asked in 1 Companies Q244. Can you tell us a use case of reflection in java that you have applied ? Design
This question was recently asked at 'CenturyLink'.This question is still unanswered. Can you please provide an answer. Help us improve. Please let us know the company, where you were asked this question : Like Discuss Correct / Improve  reflection Asked in 1 Companies Q245. Give specific situation about when to go for constructor based injection and setter based injection in spring. Spring
This question was recently asked at 'Tata Consultancy (TCS)'.This question is still unanswered. Can you please provide an answer. Help us improve. Please let us know the company, where you were asked this question : Like Discuss Correct / Improve   Asked in 1 Companies Ans. @ComponentScan in a Spring Application.
With Spring, we use the @ComponentScan annotation along with the @Configuration annotation to specify the packages that we want to be scanned. @ComponentScan without arguments tells Spring to scan the current package and all of its sub-packages. Help us improve. Please let us know the company, where you were asked this question : Like Discuss Correct / Improve  ComponentScan  dispatcher  @ComponentScan annotation  @Configuration annotation Asked in 1 Companies Q247. What is stereotype annotation ? Spring
Ans. These annotations are used to create Spring beans automatically in the application context. The main stereotype annotation is @Component . @Controller: Which is used to create Spring beans at the controller layer. The stereotype annotations in spring are @Component, @Service, @Repository and @Controller Help us improve. Please let us know the company, where you were asked this question : Like Discuss Correct / Improve  stereotype annotation   stereotype annotation spring Asked in 1 Companies Q248. Write program to control traffic in a parking lot. Design
This question was recently asked at 'MathWorks'.This question is still unanswered. Can you please provide an answer. Help us improve. Please let us know the company, where you were asked this question : Like Discuss Correct / Improve   Asked in 1 Companies Q249. When singleton can break and how to resolve it Design
Ans. Deserialization. In serialization, we can save the object of a byte stream into a file or send over a network. Suppose if you serialize the Singleton class, and then again de-serialize that object, it will create a new instance, hence deserialization will break the Singleton pattern.
To overcome this issue, we need to override readResolve() method in the Singleton class and return the same Singleton instance. Help us improve. Please let us know the company, where you were asked this question : Like Discuss Correct / Improve  singleton  design patterns Asked in 1 Companies Q250. C dynamic memory questions
This question was recently asked at 'MathWorks'.This question is still unanswered. Can you please provide an answer. Help us improve. Please let us know the company, where you were asked this question : Like Discuss Correct / Improve   Asked in 1 Companies Q251. Difference between interface and inheritance Core Java
This question was recently asked at 'HCL Technologies'.This question is still unanswered. Can you please provide an answer. Help us improve. Please let us know the company, where you were asked this question : Like Discuss Correct / Improve   Asked in 1 Companies Q252. What are different awt constructs ?
This question was recently asked at 'Sabre Corporation'.This question is still unanswered. Can you please provide an answer. Help us improve. Please let us know the company, where you were asked this question : Like Discuss Correct / Improve   Asked in 1 Companies Q253. Details of networking apis supported by java.
Ans. retrofit 2, volly and OkHttp Help us improve. Please let us know the company, where you were asked this question : Like Discuss Correct / Improve   Asked in 1 Companies This question was recently asked at 'NIIT'.This question is still unanswered. Can you please provide an answer. Help us improve. Please let us know the company, where you were asked this question : Like Discuss Correct / Improve   Asked in 1 Companies Q255. What are the 22 possible values of x where x== -x (true) ? Core Java
Ans. byte x = 0;
short x = 0;
char x = 0;
int x = 0;
int x = Integer.MIN_VALUE;
float x = 0.0f;
float x = -0.0f;
long x = 0;
long x = Long.MIN_VALUE;
double x = 0.0;
double x = -0.0;
Byte x = 0;
Short x = 0;
Character x = 0;
Integer x = 0;
Integer x = Integer.MIN_VALUE;
Float x = 0.0f;
Float x = -0.0f;
Long x = 0L;
Long x = Long.MIN_VALUE;
Double x = 0.0;
Double x = -0.0; Help us improve. Please let us know the company, where you were asked this question : Like Discuss Correct / Improve   Asked in 1 Companies Q256. Where will you configure database details in tomcat server ? Tomcat
Ans. Add a file META-INF/context.xml into the root of your web application folder, which defines database connection detail :
File : META-INF/context.xml Help us improve. Please let us know the company, where you were asked this question : Like Discuss Correct / Improve   Asked in 1 Companies Q257. How do you debug Javascript code ? Javascript
This question is still unanswered. Can you please provide an answer. Help us improve. Please let us know the company, where you were asked this question : Like Discuss Correct / Improve   Q258. Differences between MongoDB and mysql. Database
This question was recently asked at 'RiseSmart'.This question is still unanswered. Can you please provide an answer. Help us improve. Please let us know the company, where you were asked this question : Like Discuss Correct / Improve   Asked in 1 Companies Q259. Create DB schema for Employee, Department. Database
This question was recently asked at 'RiseSmart India,RiseSmart'.This question is still unanswered. Can you please provide an answer. Help us improve. Please let us know the company, where you were asked this question : Like Discuss Correct / Improve  db schema  database schema  database design Asked in 2 Companies Q260. What are the distributed caches ? Server
This question was recently asked at 'RiseSmart India'.This question is still unanswered. Can you please provide an answer. Help us improve. Please let us know the company, where you were asked this question : Like Discuss Correct / Improve  caching  server  production support Asked in 1 Companies Q261. What is something faulty about java ? Core Java
Ans. Not purely object oriented Language. Help us improve. Please let us know the company, where you were asked this question : Like Discuss Correct / Improve   expert Q262. Can we have more than two constructors in a class ? Core Java
Ans. Yes, through constructor overloading Help us improve. Please let us know the company, where you were asked this question : Like Discuss Correct / Improve  constructor overloading Q263. If we have a return statement inside the finally block, Then what will happen ? Core Java
Ans. Returning from inside a finally block will cause exceptions to be lost. A return statement inside a finally block will cause any exception that might be thrown in the try block to be discarded. Help us improve. Please let us know the company, where you were asked this question : Like Discuss Correct / Improve  exception handling  finally block Asked in 1 Companies Q264. What is the concept of hibernate versioning ? Hibernate
This question was recently asked at 'Tata Consultancy (TCS)'.This question is still unanswered. Can you please provide an answer. Help us improve. Please let us know the company, where you were asked this question : Like Discuss Correct / Improve  hibernate versioning Asked in 1 Companies Q265. What is cluster ?
This question was recently asked at 'idealake information technologies'.This question is still unanswered. Can you please provide an answer. Help us improve. Please let us know the company, where you were asked this question : Like Discuss Correct / Improve   Asked in 1 Companies Q266. Sort an Employee Object based on Name or Age Database
Ans. Use Comparable or Comparator interface Help us improve. Please let us know the company, where you were asked this question : Like Discuss Correct / Improve  sql query Asked in 1 Companies Q267. If you are asked to test an application without any documentation, What type of testing will you do ? Testing
Ans. White Box Testing
Unit Testing
Ad Hoc Testing Help us improve. Please let us know the company, where you were asked this question : Like Discuss Correct / Improve   Asked in 1 Companies Q268. Can we load environment variables into Properties in Java ? How ? Core Java
Ans. Yes
new Properties().putAll(System.getenv()); Help us improve. Please let us know the company, where you were asked this question : Like Discuss Correct / Improve  java.util.properties  environment variables Q269. Difference between System.getEnv and System.getProperties ? Core Java
Ans. System.getEnv gets the environment variables where System.getProperties gets Java properties. Help us improve. Please let us know the company, where you were asked this question : Like Discuss Correct / Improve  System.getEnv  System.getProperties  environment variables Q270. Difference between HashMap and Dictionary in Java ? Core Java
Ans. HashMap implements the Map interface while the Dictionary does not.
HashMap was introduced after HashTable and Dictionary.
Dictionary is currently obsolete in java. Help us improve. Please let us know the company, where you were asked this question : Like Discuss Correct / Improve  hashmap  dictionary class