Interview Questions and Answers - Order By Rating Q391. 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 Q392. Difference between Spring and Spring MVC ? Spring
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   Q393. 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 Q394. 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 Q395. Write program to recursively iterate through map ? Core Java
This question was recently asked at 'Cloudflare'.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 Q397. 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 Q398. 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 Q399. 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 Q400. 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 Q401. 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 Q402. Combine and join integer and string list to single list and sort. Core Java
Ans. Object[] combined = new Object[first.length second.length];
System.arraycopy(first, 0, combined, 0, first.length);
System.arraycopy(second, 0, combined, first.length, second.length);
-- OR --
Object[] combined = Stream.concat(Arrays.stream(first), Arrays.stream(second)).toArray(); Help us improve. Please let us know the company, where you were asked this question : Like Discuss Correct / Improve   Asked in 1 Companies Q403. 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 Q404. 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 Q406. 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 Q407. What is the WIP branch in SCM ?
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   Q408. Can we increase the buffer size while working with Buffered Streams ? How ? Core Java
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   Q409. Can we disable auto flushing for PrintWriter ? Core Java
Ans. Yes Help us improve. Please let us know the company, where you were asked this question : Like Discuss Correct / Improve   Q410. Have you ever faced any problem because of PrintWriter buffer and autoflush mechanism ? How did you got rid of it ? Core Java
Ans. Yes , we faced trouble once wherein we were trying to set certain elements to the PrintWriter. As in some cases the PrintWriter held too much information and hence it would get flushed before we could append those elements.
We disabled auto flushing and provided our own explicit flushing. Help us improve. Please let us know the company, where you were asked this question : Like Discuss Correct / Improve   Q411. How elements are passed to the server in case of Get and Post request ? Web Service
Ans. In case of Get request, form data / values are sent within url whereas these are sent as part of request body in case of Post. Help us improve. Please let us know the company, where you were asked this question : Like Discuss Correct / Improve   Q412. 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 Q413. Difference between kill -9 and kill -15 ? Unix
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   Q414. 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   Q415. Can we have 2 styling classes with a single div element ? Which class will take precedence in case of conflict in such case ? CSS
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   Q416. 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 Q417. 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 Q418. 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 Q419. What are the limitations of Java ? General
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   Q420. What are meta classes in Java ? Core Java
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