Interview Questions and Answers - Order By Newest Q2971. If you are asked to develop a financial system, how would you make sure that there are proper checks , balances and audits ? Solution
This question was recently asked at 'BzzAgent'.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  Design  Security Asked in 1 Companies Q2972. How can you prove your honesty ? General
This question was recently asked at 'Gallup'.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 Q2973. Which maven commands you usually work with ? Maven
This question was recently asked at 'Akvelon'.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  maven Asked in 1 Companies Q2974. Design an in memory object oriented system for a Car manufacturing Company ? Design
This question was recently asked at 'Audacious Inquiry'.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 Q2975. Write a method that would solve two problems at the same time ? Core Java
Ans. We can return value for one problem solving or computation and set the value for other in some member element. Help us improve. Please let us know the company, where you were asked this question : Like Discuss Correct / Improve   Q2976. why is "".equals(str); safer than str.equals("")? Core Java
Ans. str.equals("") this statement will throw NullPointerException if str is null where as "".equals(str) works fine even if str is null Help us improve. Please let us know the company, where you were asked this question : Like Discuss Correct / Improve  equals method Asked in 1 Companies Q2977. Can we have a final argument in a method ? What is the use of that if we do so ? Core Java
This question was recently asked at 'Webster Bank'.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 Q2978. What is a difference between JUnit 3 and 4 ? Junit
This question was recently asked at 'Conde Nast'.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  testing  junit Asked in 1 Companies Q2979. What is the minimum number of tables required to perform a SQL join? Database
Ans. 1 , We can do self join
Help us improve. Please let us know the company, where you were asked this question : Like Discuss Correct / Improve  sql join Asked in 1 Companies Q2980. Code an elevator simulator. Design
This question was recently asked at 'TrustArc'.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 This question was recently asked at 'IBM 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  queue  stack Asked in 1 Companies Q2982. How would you test a Twitter application ? Testing
This question was recently asked at 'Slalom'.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  solution  testing Asked in 1 Companies Q2983. Write a calculator and find if a character appears more than n times ? Design
This question was recently asked at 'Mercury Systems'.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 Q2984. Can we keep application configuration at different places and what could be the consideration for choosing multiple places for doing so ? Design
Ans. Yes an application can have configuration stored at multiple places. Factors that could facilitate such a design could be
1. Type of config information - We may have a case to store confidential information differently than other regular config value
2. Environment - We may like to have a base config ( defined in application package ) and then a different override mechanism in different environments.
3. Centralization - Sometime some configs need to be shared across application and hence centralized.
4. Testing - Testing against config may not be possible in some enviornments in certain cases and hence additional config store might be kept for testing purpose only. Help us improve. Please let us know the company, where you were asked this question : Like Discuss Correct / Improve  Design  Solution Q2985. Do you think it's a good practice to keep passwords in config files ? Solution
Ans. We can keep them in config as encrypted values. Help us improve. Please let us know the company, where you were asked this question : Like Discuss Correct / Improve   Q2986. How to write an iterator for an iterator of iterators? Core Java
Ans. CustomArrayList myarrayList = new CustomArrayList();
myarrayList.add("Value 1");
myarrayList.add("Value 2");
myarrayList.add("Value 3");
for (String string : myarrayList) {
System.out.println(string);
}
package sample.utils;
import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;
public class CustomArrayList implements Iterable {
private ArrayList mylist = new ArrayList();
public void add(T t) {
this.mylist.add(t);
}
@Override
public Iterator iterator() {
return new CustomIterator(mylist);
}
class CustomIterator implements Iterator {
private int indexPosition = 0;
private List internalList;
public CustomIterator(List internalList) {
this.internalList = internalList;
}
@Override
public boolean hasNext() {
if (internalList.size() >= indexPosition 1) {
return true;
}
return false;
}
@Override
public E next() {
E val = internalList.get(indexPosition);
indexPosition ;
return val;
}
}
} Help us improve. Please let us know the company, where you were asked this question : Like Discuss Correct / Improve  iterator Asked in 1 Companies Q2987. What is an identity matrix ?
This question was recently asked at 'ServiceNow'.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 Q2988. How does one do matrix multiplication?
This question was recently asked at 'ServiceNow'.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 Q2989. What are the disadvantages of binary search trees? Algorithm
This question was recently asked at 'ServiceNow'.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  binary search tree Asked in 1 Companies Q2990. Design a appointment booking system for a chain of hospitals. Design
This question was recently asked at 'ServiceNow'.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 Q2991. Please explain the architecture of our application through a diagram ? General
This question was recently asked at 'Alfresco Software,Ancestry'.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 Q2992. How many heaps will be there with 3 threads ? Core Java
Ans. All threads share a common heap.
Each thread has a private stack, which it can quickly add and remove items from. This makes stack based memory fast, but if you use too much stack memory, as occurs in infinite recursion, you will get a stack overflow. Help us improve. Please let us know the company, where you were asked this question : Like Discuss Correct / Improve  memory management  heap memory Asked in 1 Companies Q2993. What does 'variable hoisting' mean? JavaScript
Ans. Help us improve. Please let us know the company, where you were asked this question : Like Discuss Correct / Improve   Asked in 1 Companies Q2994. Explain when you would decide to use open authentication ? Authentication
Ans. Google OAuth can be used when we want to grant the access of our google credentials to the service provider ( most likely a cloud-based mobile application) by using the option ' Login via Google' Help us improve. Please let us know the company, where you were asked this question : Like Discuss Correct / Improve  open authentication Asked in 1 Companies Q2995. Why Hadoop serialized data types are not using in Spark serialization ? BigData
This question was recently asked at 'Tavant Technology'.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 Q2996. Explain CloneNotSupportedException ? Core Java
Ans. If we do not mention, Cloneable Interface to the Class which we want to Clone then we get this exception, only if we try to clone an object
Like:
public class TestClone{
@Override
protected Object clone() throws CloneNotSupportedException {
return super.clone();
}
}
In Main, You try to do:
TestClone clone = new TestClone();
TestClone clone2 = (TestClone) clone.clone();
You will get CloneNotSupportedException.
Just add -> public class TestClone implements Cloneable {
and things are fixed. Help us improve. Please let us know the company, where you were asked this question : Like Discuss Correct / Improve  exceptions handling  cloning Q2997. Does abstract class have public constructor? Core Java
Ans. Yes, an abstract class can have a constructor in Java. Help us improve. Please let us know the company, where you were asked this question : Like Discuss Correct / Improve  abstract class  public constructor Asked in 1 Companies Q2998. What measures would you take to avoid Java threading issues in a multi-threaded environment ?
This question was recently asked at 'Fifth Third Bank'.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. Yes Help us improve. Please let us know the company, where you were asked this question : Like Discuss Correct / Improve  aws param store  amazon param store  aws lambda  amazon lambdaAns. No HashMap isn't synchronized. ConcurrentHashMap and Hashtable are synchronized. Help us improve. Please let us know the company, where you were asked this question : Like Discuss Correct / Improve  hashmap  synchronization