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 - Order By Rating | ||||
Frequently asked these days as there are major changes in Java 8. | ||||
| ||||
Ans. Lambda Expressions , Interface Default and Static Methods , Method Reference , Parameters Name , Optional , Streams, Concurrency. | ||||
Sample Code for Lambda Sample Code for interface default Sample Code for Optional Sample Code for Streams Sample Code for java.time Sample Code for Predicate Sample Code for Consumer Sample Code for MapMerge | ||||
Help us improve. Please let us know the company, where you were asked this question : | ||||
Like Discuss Correct / Improve  java   java8   technical lead   technical architect Asked in 14 Companies expert   frequent | ||||
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. http://www.cyberciti.biz/faq/key-differences-between-tcp-and-udp-protocols/ | ||||
Help us improve. Please let us know the company, where you were asked this question : | ||||
Like Discuss Correct / Improve  java   network programming   architecture   Cloud Computing  Google Cloud Computing (GCP)  Amazon Web Services (AWS) Asked in 3 Companies | ||||
| ||||
Ans. 1. Query Optimization ( Query Rewriting , Prepared Statements ) 2. Restructuring Indexes. 3. DB Caching Tuning ( if using ORM ) 4. Identifying the problems ( if any ) with the ORM Strategy ( If using ORM ) | ||||
Help us improve. Please let us know the company, where you were asked this question : | ||||
Like Discuss Correct / Improve  java   db   database   hibernate   orm   at&t   overstock.com   performance improvement   architecture   technical lead   architect intermediate | ||||
| ||||
Ans. Mockito, PowerMock, EasyMock, JMock, JMockit | ||||
Help us improve. Please let us know the company, where you were asked this question : | ||||
Like Discuss Correct / Improve  junit   mocking frameworks   mock   architecture   white box testing | ||||
| ||||
Ans. In first case, there would be 2 DB calls in worst case and 1 in best case. In 2nd approach there will be always 2 DB calls. Decision on the approach should depend on the following considerations - 1. How costly is the call to DB ? Are we using indices , hibernate etc If calls to DB are costly , 1st approach should be the choice. 2. Exception Book keeping load upon exception. The benefit of saving 1st call in approach 1 should be bigger than the Book keeping for the exception. 3. Probability of the exception in first apparoach. If the DB Table is almost empty, it makes sense to follow Approach 1 as majority of the 1st calls will pass through without exception. | ||||
Help us improve. Please let us know the company, where you were asked this question : | ||||
Like Discuss Correct / Improve  database   insert-update   db exceution plan   db strategy   design   architecture   technical lead | ||||
| ||||
Ans. If its already there in Maven local repository, We can add that as a dependency in the project pom file with its Group Id, Artifact Id and version. We can provide additional attribute SystemPath if its unable to locate the jar in the local repository. If its not there in the local repository, we can install it first in the local repository and then can add it as dependency. | ||||
Help us improve. Please let us know the company, where you were asked this question : | ||||
Like Discuss Correct / Improve  maven   maven dependencies   jar   architecture | ||||
| ||||
Ans. 1. It shouldn't result in infinite loop. Please make sure that you have a condition that will terminate the loop and that condition should be reached. 2. Make sure to use the break statement if you aspire to only look for something. Not using break will unnecessarily execute it till the end of for loop in some cases. 3. Similarly use continue to execute the loop with next iteration and bypass the rest of the code block if required. 4. Try to avoid multiple nesting of for loops. If it''s required, Make sure to use break and continue properly so as to avoid some unnecessary processing. 5. Make sure to use try catch within the loop and not outside the for loop if you expect it to continue if one of the iteration fails. | ||||
Help us improve. Please let us know the company, where you were asked this question : | ||||
Like Discuss Correct / Improve  java   loops   continue   break   for loop  control statements  loop statement.while loop  control statements  loop statement   architecture | ||||
| ||||
Ans. No, Java runs on a virtual machine called JVM and hence doesn't embed well with the underlying hardware. Though we can create a platform independent system software but that would be really slow and that's what we would never need. | ||||
Help us improve. Please let us know the company, where you were asked this question : | ||||
Like Discuss Correct / Improve  java   system software java   jvm   yes-no   yes no   java operating system   architecture | ||||
| ||||
Ans. For creating platform independent software applications. | ||||
Help us improve. Please let us know the company, where you were asked this question : | ||||
Like Discuss Correct / Improve  java   java use   architecture | ||||
| ||||
Ans. JPA or Java Persistence API is a standard specification for ORM implementations whereas Hibernate is the actual ORM implementation or framework. | ||||
Help us improve. Please let us know the company, where you were asked this question : | ||||
Like Discuss Correct / Improve  jpa   hibernate   orm   architecture   technologies Asked in 2 Companies | ||||
| ||||
Ans. Use Case Diagram, Component Diagram for High level Design and Class Diagram , Sequence Diagram for low level design. | ||||
Help us improve. Please let us know the company, where you were asked this question : | ||||
Like Discuss Correct / Improve  software system analyst   development lead   project lead   technical lead   technical architect expert   frequent | ||||
| ||||
Ans. We as a team of developers , testers , analyst , lead and architect sit close to each other. Most of the time I would just jump to their seat and talk to them ( if required ). We have daily stand up where we discuss things that needs team attention. | ||||
Help us improve. Please let us know the company, where you were asked this question : | ||||
Like Discuss Correct / Improve  system software analyst   technical architect   technical lead   project lead   development lead | ||||
| ||||
Ans. We have multi tier architecture with multiple layers , We have series of web servers and applications in application tier, infrastructure libraries at middle tier and Database servers at the lower tier. We are using Oracle as Database, ESB ( Enterprise service Bus ) for asynchronous communication and Rest Web Services. | ||||
Help us improve. Please let us know the company, where you were asked this question : | ||||
Like Discuss Correct / Improve  software system analyst   development lead   project lead   technical lead   technical architect | ||||
| ||||
Ans. I like Spring as it comes with inbuilt Dependency Injection framework. It has great online community and support and is proven to work well with ORMs like Hibernate. If we are not working with ORM and DI, Struts 2 is also good. | ||||
Help us improve. Please let us know the company, where you were asked this question : | ||||
Like Discuss Correct / Improve  spring   struts   project lead   technical lead   techical architect | ||||
| ||||
Ans. We are using cluster of Web servers and Application servers. Load Balancer is used to manage the load between them. Down the layer we have middleware server and then DB server to access database. | ||||
Help us improve. Please let us know the company, where you were asked this question : | ||||
Like Discuss Correct / Improve  architecture   production support   java   servers   application support Asked in 7 Companies   frequent | ||||