Search Interview Questions | ![]() ![]() Click here and help us by providing the answer. ![]() Click Correct / Improve and please let us know. |
|
| ||||
Interview Questions and Answers - Order By Rating | ||||
![]() ![]() | ||||
![]() | ||||
| ||||
Ans. https://www.geeksforgeeks.org/lru-cache-implementation/ | ||||
![]() | ||||
![]() ![]() ![]() ![]() ![]() | ||||
| ||||
Ans. class Bank { int balance; Bank(){ balance = 0; } void deposit(int amount){ balance = balance amount; } int withdraw(int amount){ balance = balance - amount; return balance; } } | ||||
![]() | ||||
![]() ![]() ![]() ![]() ![]() | ||||
| ||||
Ans. Spring Security is a powerful and highly customizable authentication and access control framework. It is the de facto standard for securing Spring-based applications. | ||||
![]() | ||||
![]() ![]() ![]() ![]() | ||||
| ||||
Ans. static is the keyword that makes it accessible even without creating any object and using class name only. Making it non static would like creation of object upfront before calling the method. | ||||
![]() | ||||
![]() ![]() ![]() ![]() ![]() | ||||
| ||||
Ans. static keyword is used to specify that the respective programming construct ( method , variable ) belongs to the class and not to its instance and is supposed to be shared by all instances of the class. | ||||
![]() | ||||
![]() ![]() ![]() ![]() ![]() ![]() | ||||
| ||||
Ans. General contract of hashCode is: 1.Whenever it is invoked on the same object more than once during an execution of a Java application, the hashCode method must consistently return the same integer, 2.If two objects are equal according to the equals(Object) method, then calling the hashCode method on each of the two objects must produce the same integer result. 3.It is not required that if two objects are unequal according to the equals(java.lang.Object) method, then calling the hashCode method on each of the two objects must produce distinct integer results. | ||||
![]() | ||||
![]() ![]() ![]() ![]() ![]() | ||||
| ||||
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. | ||||
![]() | ||||
![]() ![]() ![]() ![]() | ||||
| ||||
Ans. [Open Ended Answer] | ||||
![]() | ||||
![]() ![]() ![]() ![]() | ||||
| ||||
Ans. [Open Ended Answer] | ||||
![]() | ||||
![]() ![]() ![]() ![]() ![]() | ||||
![]() | ||||
| ||||
Ans. Inner join is the intersection of two tables on the condition defined by the where clause i.e will get records from both tables matched by a column. Outer join is the union of two tables i.e will get all records from both tables and will put null in the columns where related records are not present. Left Outer join is the left union of two tables i.e all records from the table on the left and values from the right table for related records else null for the columns from right table. Right Outer join is the right union of two tables i.e all records from the table on the right and values from the left table for related records else null for the columns from left table. | ||||
![]() | ||||
![]() ![]() ![]() ![]() ![]() ![]() | ||||
| ||||
Ans. An Exception in java is the occurrence during computation that is anomalous and is not expected. Exception handling is the mechanism which is used to handle such situations. | ||||
![]() | ||||
![]() ![]() ![]() ![]() ![]() ![]() | ||||
| ||||
Ans. If the process / app is abruptly killed or terminated. | ||||
![]() | ||||
![]() ![]() ![]() ![]() ![]() | ||||
![]() | ||||
| ||||
Ans. A media access control address is a unique identifier assigned to network interfaces for communications at the data link layer of a network segment. MAC addresses are used as a network address for most IEEE 802 network technologies, including Ethernet and Wi-Fi. | ||||
![]() | ||||
![]() ![]() ![]() ![]() ![]() | ||||
| ||||
Ans. https://en.wikipedia.org/wiki/Database_normalization | ||||
![]() | ||||
![]() ![]() ![]() ![]() ![]() ![]() | ||||
| ||||
Ans. class A { void test() { System.out.println("test() method"); } } class B { void test() { System.out.println("test() method"); } } Suppose if Java allows multiple inheritance like this, class C extends A, B { } A and B test() methods are inheriting to C class. So which test() method C class will take? As A & B class test() methods are different , So here we would Facing Ambiguity. | ||||
![]() | ||||
![]() ![]() ![]() ![]() ![]() ![]() | ||||
| ||||
Ans. Throwable | ||||
![]() | ||||
![]() ![]() ![]() ![]() ![]() ![]() | ||||
| ||||
Ans. No | ||||
![]() | ||||
![]() ![]() ![]() ![]() ![]() | ||||
| ||||
Ans. Braces, i.e () and [] have the highest precedence | ||||
![]() | ||||
![]() ![]() ![]() | ||||
| ||||
Ans. 1. Method local variables - These are declared and defined within a method ( instance or static methods ) and their scope is limited to the method itself. They are destructed once the execution of method completes. They are stored in stack memory. 2. Instance variables - These are declared as non static variables as part of the class.They are initialized as part of object creation ( constructor ) and are destructed by java's garbage collection mechanism and hence stored in heap. 3. Static variables - These are declared with the static keyword and are part of the class. They are initialized at the time of class loading and are destructed by java's garbage collection mechanism and hence stored in heap. | ||||
![]() | ||||
![]() ![]() ![]() | ||||
| ||||
Ans. Static , Final , Synchronized, private , public , protected, volatile, transient, super, this,import , abstract,native,default (effective java 8), new | ||||
![]() | ||||
![]() ![]() ![]() ![]() | ||||
| ||||
Ans. Object Oriented - Java is object oriented but isn't purely object oriented as we have primitives along with objects. Platform Independent - As JVM provides the translation to the Machine code as per the underlying Operating System. Interpreted as well as compiled - Java files are compiled as class files and then class files are interpreted by JVM. Runs on a Virtual Machine - Which is JVM that acts as an independent sub environment. Multi-threaded - As applications can run on single thread as well as multi thread. Modularity - Through usage of Classes , methods and Interfaces. Robust Usage in variety of Application types - Web , Gaming, BigData. | ||||
![]() | ||||
![]() ![]() ![]() ![]() | ||||
| ||||
Ans. 1. for loop in java is used with a counter as following for(int counter=0;counter < 50;counter++){ System.out.println(list.get(counter)); } for iterating and printing the contents of a collection whereas foreach loop can be specified directly without the use of counter for(String str:list){ System.out.println(list.get(counter)); } 2. for Each loop syntax is more clean if we have to iterate over the elements of a collection and we need not keep track of the record count 3. For is preferred when we need loops without the usage of collections or Array of objects and entirely primitives are being used 4. for loop is preferred if we need to keep track of record count and have to perform some action of the basis of that. For example - If we have to print something after every 5 records, With for each loop in such case, we will have to keep a separate counter. | ||||
![]() | ||||
![]() ![]() ![]() | ||||
| ||||
Ans. In the contract xml files. | ||||
![]() | ||||
![]() ![]() ![]() | ||||
| ||||
Ans. Catalog business policies Catalog business policies define the scope and characteristics of the catalog of products for sale in a store including prices and the categorization of products in a store's catalog. Payment business policies Invoicing, payment, and refund business policies define how a store accepts payments, pays refunds, and the format of a store's invoices. Returns business policies Returns business policies define if refunds are accepted, the time period they are accepted for, and any re-stocking fees applied to returns. Shipping business policies Shipping business policies define the shipping providers a store can use and the charges associated with each type. Referral interface business policies Referral interface business policies define the relationship between a proxy store and a remote store. | ||||
![]() | ||||
![]() ![]() ![]() | ||||
| ||||
Ans. Step 1 - Create a new policy definition by adding record in tables POLICY, POLICYDESC. Step 3 - Associate commands to the new policy by adding records in POLICYCMD. Step 2 - Associate the new policy with its terms and conditions by adding a record in relationship table POLICYTC. Step 4 - Add reference to the policy in the repective contract xml file. | ||||
![]() | ||||
![]() ![]() ![]() | ||||
| ||||
Ans. By making Debug=true within WCSPromotionEngineConfig.xml | ||||
![]() | ||||
![]() ![]() ![]() | ||||
| ||||
Ans. USERREG | ||||
![]() | ||||
![]() ![]() ![]() | ||||
| ||||
Ans. wc-server.xml stores the DB configuration. We can either change it manually or by using setdbtype command. | ||||
![]() | ||||
![]() ![]() ![]() | ||||
| ||||
Ans. Remove the jsp entry from cachespec.xml. | ||||
![]() | ||||
![]() ![]() ![]() | ||||
| ||||
Ans. We can query the DB as follows Select NAME from PX_PROMOTION where STATUS=1; | ||||
![]() | ||||
![]() ![]() ![]() | ||||
![]() ![]() | ||||