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 Newest | ||||
| ||||
Ans. It is part of the analysis of a program and describes a situation that a program might encounter and what behavior the program should exhibit in that circumstance. | ||||
Help us improve. Please let us know the company, where you were asked this question : | ||||
Like Discuss Correct / Improve  use cases   design   high level design   testing   test driven development   software system analyst   project lead basic   frequent | ||||
| ||||
Ans. It's a facility that allows traversal over the records pulled from a table or combination of tables. Its like iterator in Java. | ||||
Help us improve. Please let us know the company, where you were asked this question : | ||||
Like Discuss Correct / Improve  databases   sql   cursors   packages Asked in 5 Companies basic   frequent | ||||
Very frequently asked. Usually followed by questions related to private constructor and synchronized access. Frequently asked in JPMorgan and TCS (Based on 2 feedback) | ||||
| ||||
Ans. http://www.buggybread.com/2014/03/java-design-pattern-singleton-interview.html | ||||
Help us improve. Please let us know the company, where you were asked this question : | ||||
Like Discuss Correct / Improve  java   design pattern   singleton   at&t   ebay  fidelity india  united healthcare india Asked in 46 Companies intermediate   frequent | ||||
| ||||
Ans. Still No in case we are making use of inheritance. we may have problem wherein we have program flow moving across common inherited method and specific methods of the derived class. call made to another static method in the parent class will only access the static class of the Parent class irrespective of the call from any of the derived class. | ||||
Help us improve. Please let us know the company, where you were asked this question : | ||||
Like Discuss Correct / Improve  static class   static vs singleton   inheritance | ||||
| ||||
Ans. String str = new StringBuilder().append("Buggy").append("Bread").toString(); | ||||
Help us improve. Please let us know the company, where you were asked this question : | ||||
Like Discuss Correct / Improve  java   builder pattern   design pattern   stringbuilder   string Asked in 3 Companies | ||||
Try 1 Question(s) Test | ||||
| ||||
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 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. Singleton class instance is initiated using new keyword whereas static class instance is created using static method. | ||||
Help us improve. Please let us know the company, where you were asked this question : | ||||
Like Discuss Correct / Improve  java   oops   singleton   design pattern   static class | ||||
| ||||
Ans. Fail Safe systems are tolerant systems that continue processing even if they sense any problem. the objective here is to continue with the processing even if there are some problems instead of completely shutting it down. Example could be to catch an exception and still letting it complete with partial results. | ||||
Help us improve. Please let us know the company, where you were asked this question : | ||||
Like Discuss Correct / Improve  fail safe systems   system design   exception handling Asked in 3 Companies | ||||
| ||||
Ans. TDD is a development process that involves short iterations: first an automated test case is written. Then, the code is written to pass that test, and finally one refactors the new code to acceptable standards. | ||||
Help us improve. Please let us know the company, where you were asked this question : | ||||
Like Discuss Correct / Improve  elsevier   test driven design ( TDD )   software development methodologies Asked in 3 Companies   frequent | ||||
Frequently asked in face to face interviews. | ||||
| ||||
Ans. int count = 15; int[] fibonacci = new int[count]; fibonacci[0] = 0; fibonacci[1] = 1; for(int x=2; x < count; x++){ fibonacci[x] = fibonacci[x-1] + fibonacci[x-2]; } for(int x=0; x< count; x++){ System.out.print(fibonacci[x] + " "); } | ||||
Help us improve. Please let us know the company, where you were asked this question : | ||||
Like Discuss Correct / Improve  ebay   fibonacci series Asked in 66 Companies basic   frequent | ||||
| ||||
Ans. http://javasearch.buggybread.com/CodeSnippets/searchCodeSamples.php?keyword=singleton+class&category=code | ||||
Help us improve. Please let us know the company, where you were asked this question : | ||||
Like Discuss Correct / Improve  singleton  code  coding  design pattern Asked in 1 Companies Intermediate   frequent | ||||
| ||||
Ans. http://javasearch.buggybread.com/CodeSnippets/searchCodeSamples.php?&category=code&searchOption&keyword=964 | ||||
Help us improve. Please let us know the company, where you were asked this question : | ||||
Like Discuss Correct / Improve  builder design pattern  builder pattern  code  coding intermediate | ||||
| ||||
Ans. Fail fast systems are intolerant systems that fails at the first instance of smelling any problem. The objective here is to break the system instead of continuing with the possibly flawed processing. Example could be breaking the processing upon an exception. | ||||
Help us improve. Please let us know the company, where you were asked this question : | ||||
Like Discuss Correct / Improve  fail fast systems   system design Asked in 1 Companies | ||||
| ||||
Ans. Web Service promotes looser coupling but with comes with coding and performance overheads. Jars provide better performance and may be lesser coding but are problematic with update distribution. If the situation doesn't require frequent dependency updates and if it's only read operation of persistence, Having dependencies should be a better choice , otherwise web service. | ||||
Help us improve. Please let us know the company, where you were asked this question : | ||||
Like Discuss Correct / Improve  Design  Web Service vs Jar | ||||
Frequently asked for Lead and Architect positions. Recently asked in many US companies. | ||||
| ||||
Ans. Anti-pattern is simply the creation of a pattern in your coding that negatively affects your code i.e the Negatives surpasses the positives. | ||||
Help us improve. Please let us know the company, where you were asked this question : | ||||
Like Discuss Correct / Improve  anti patterns  design patterns Asked in 9 Companies   frequent | ||||
| ||||
Ans. It make sense only if we intend to modify either of the object and would like to preserve original state in other. Otherwise we can reuse the original object by making it singleton. | ||||
Help us improve. Please let us know the company, where you were asked this question : | ||||
Like Discuss Correct / Improve  clone  clone objects  prototype design pattern   immutable  immutability  immutability  cloning | ||||
| ||||
Ans. Yes , it can be but it may not be an optimal alternative if we need to change the values frequently. As Enum is compiled like any Java File , any change requires the application to be rebuild , deployed and restart. | ||||
Help us improve. Please let us know the company, where you were asked this question : | ||||
Like Discuss Correct / Improve  enum  design | ||||
| ||||
Ans. public class BuggyBread { | ||||
Help us improve. Please let us know the company, where you were asked this question : | ||||
Like Discuss Correct / Improve  builder pattern  builder class | ||||
Try 1 Question(s) Test | ||||
| ||||
Ans. Following Tables can be created ASSET - Entity Table With foreign key reference to Table AssetType ASSET_TYPE - Entity Table specifying information related to Asset Type like Books, CDs etc. MEMBER - Registration information for the member MEMBERSHIP_TYPE - Membership Types provided by Library MEMBERSHIP - Relation table with foreign key for MEMBER , MEMBERSHIP_TYPE ASSET_ISSUE_LEDGER - Relationship between MEMBER and ASSET. This specify the issue of particular asset to a particular member. | ||||
Help us improve. Please let us know the company, where you were asked this question : | ||||
Like Discuss Correct / Improve  design Asked in 1 Companies | ||||
Frequently asked Design Pattern interview question. | ||||
| ||||
Ans. The prototype pattern is a creational design pattern. It is used when the type of objects to create is determined by a prototypical instance, which is cloned to produce new objects. Prototype is used when we need duplicate copies of objects. | ||||
Help us improve. Please let us know the company, where you were asked this question : | ||||
Like Discuss Correct / Improve  design pattern  prototype design pattern  cloning Asked in 11 Companies intermediate | ||||
| ||||
Ans. Entries in DB will be retrieved at runtime unless a cache is maintained in application. Entries in File will be loaded to memory by default. Both can be implemented in 1 manner or other. By default property file will take space in memory, will be faster, and will require application restart on change. By Default DB config will be pulled at runtime, will be little slower, and doesn't require an application restart. | ||||
Help us improve. Please let us know the company, where you were asked this question : | ||||
Like Discuss Correct / Improve  design | ||||
| ||||
Ans. Yes, When either we don't want an object to be created ( class having all static elements and hence not required ) or object to be created using a static method or static block. One such example could be a situation when we would like app to load objects at start up and we would like to restrict new object creation by any request. | ||||
Help us improve. Please let us know the company, where you were asked this question : | ||||
Like Discuss Correct / Improve  private constructor  constructor | ||||
| ||||
Ans. No, DAO's should only have methods to perform CRUD operations. Application logic should reside in service methods. | ||||
Help us improve. Please let us know the company, where you were asked this question : | ||||
Like Discuss Correct / Improve  A | ||||
| ||||
Ans. We can use an expiration map whose entries gets expired after a certain interval and then we can put the logic to retrieve the entries if its expired in map. Alternatively we can create a separate class and make map its element. We can refresh the map in this class periodically by using a monitoring thread within static block. | ||||
Help us improve. Please let us know the company, where you were asked this question : | ||||
Like Discuss Correct / Improve   | ||||
| ||||
Ans. Responsive web design is a approach to web design that allow desktop webpages to be viewed perfectly in different devices and sizes. | ||||
Help us improve. Please let us know the company, where you were asked this question : | ||||
Like Discuss Correct / Improve   Asked in 1 Companies | ||||
| ||||
Ans. AWS Services - CloudFront for distribution / caching, EC2 for computing, EBS for block storage , S3 for object storage , RDS for database , Kinesis for streaming , CloudWatch for monitoring. Technologies - Java for back end with Spring Boot , Angular , RxJs for front end . Architecture - Service Oriented. Multi layer. | ||||
Help us improve. Please let us know the company, where you were asked this question : | ||||
Like Discuss Correct / Improve   Asked in 1 Companies | ||||
| ||||
Ans. https://www.programcreek.com/2013/03/leetcode-lru-cache-java/ | ||||
Help us improve. Please let us know the company, where you were asked this question : | ||||
Like Discuss Correct / Improve   Asked in 1 Companies | ||||
| ||||
Ans. public class SingleTon { private SingleTon() { if (singleTon != null) { throw new RuntimeException("cant not create the object"); } } public Object clone() throws CloneNotSupportedException { throw new CloneNotSupportedException("can not be create"); } static private volatile SingleTon singleTon; public static SingleTon getInstance() { SingleTon singleTon = this.sample; if (singleTon == null) { synchronized (this) { singleTon = this.singleTon; if (singleTon == null) { singleTon = this.singleton = new SingleTon(); } } } return singleTon; } } | ||||
Help us improve. Please let us know the company, where you were asked this question : | ||||
Like Discuss Correct / Improve  singleton  design pattern Asked in 2 Companies | ||||
| ||||
Ans. Factory Design Patterns is the pattern that recommends creation of separate Factory Object for creation of other object. So its like saying - If you want to create an object of ClassA, Talk to FactoryObject ( which is an object of FactoryClass ). FactoryObject in itself encapsulates the inputs and logic required to make the decision regarding the creation and construction of object. | ||||
Help us improve. Please let us know the company, where you were asked this question : | ||||
Like Discuss Correct / Improve  design pattern  factory design pattern Asked in 9 Companies | ||||