Interview Questions and Answers - Order By Newest Q2701. Difference between composite , primary and unique key ? Database
This question was recently asked at 'Thomson reuters'.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 Q2702. Which programming language you hate the most and Why ? General
This question was recently asked at 'Thomson Reuters'.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. We are using Yaml for initializing configuration and Environment Variables for overriding them. Help us improve. Please let us know the company, where you were asked this question : Like Discuss Correct / Improve  aws lambda  aws serverless computing  amazon cloud serverless computing  amazon lambda Q2704. Which is a better way to keep environment specific configuration in AWS Lambda - Environment Variables or external service like S3 or RDS ? Amazon Web Services (AWS)
Ans. Possible Answer - Env variable or use parameter store Help us improve. Please let us know the company, where you were asked this question : Like Discuss Correct / Improve  aws lambda  aws serverless computing  amazon cloud serverless computing  amazon lambdaAns. No Help us improve. Please let us know the company, where you were asked this question : Like Discuss Correct / Improve  aws dynamodb  aws nosql database  amazon cloud nosql databaseAns. No Help us improve. Please let us know the company, where you were asked this question : Like Discuss Correct / Improve  aws subset  aws internet gatewayAns. No. They are never inherited and therefore are not subject to hiding or overriding. Help us improve. Please let us know the company, where you were asked this question : Like Discuss Correct / Improve  constructor  final  final constructor Asked in 1 Companies Q2708. Can a constructor be declared static ? Why ? Core Java
Ans. No.
When we declare a method static, it means that "this belongs to class as whole and not particular instance". The whole purpose of constructor is to initialize a object and hence there is no sense having static constructor. Help us improve. Please let us know the company, where you were asked this question : Like Discuss Correct / Improve  constructor  static  static constructor Asked in 1 Companies 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   Q2710. How can we take snapshots and track changes to environment variables in Elastic Beanstalk or Lambda ? Amazon Web Services (AWS)
Ans. We can use AWS Config Help us improve. Please let us know the company, where you were asked this question : Like Discuss Correct / Improve  aws elastic beanstalk  amazon elastic beanstalk  aws lambda  aws serverless computing  amazon cloud serverless computing  amazon lambda Q2711. 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 Q2712. 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 Q2713. 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 Q2714. 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 Q2715. 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   Q2716. 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 Q2717. 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 Q2718. 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 Q2719. 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 Q2720. 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 Q2722. 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 Q2723. 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 Q2724. 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 Q2725. 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 Q2726. 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 Q2727. 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 Q2728. 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 Q2729. 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 Q2730. 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