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.
Ans. It's an operating system file that maps IP address to host names. The hosts file assists the OS in addressing networked components and serves the function of translating human friendly hostnames into numeric protocol addresses, called IP addresses, that identify and locate a host in an IP network.
Help us improve. Please let us know the company, where you were asked this question :
Ans. There is no specific order in which database fires the triggers if they are for the same operation. If we need to have a specific order for their execution, we should have them all in a stored procedure and the procedure should get executed upon the event.
Help us improve. Please let us know the company, where you were asked this question :
Ans. Games are very good examples of threading.You can use multiple objects in games like cars, motor bikes, animals, people etc. All these objects are nothing but just threads that run your game application.
Help us improve. Please let us know the company, where you were asked this question :
Ans. All Keywords , modifiers ( public , static , final etc ) as well as non modifier keywords ( for, if,switch etc ) are reserved words in java and hence cannot be used as identifiers. Along with keywords , there are few literals that have predefined meaning and hence cannot be used as identifiers, these are true , false and null.
Help us improve. Please let us know the company, where you were asked this question :
Ans. Population of Manhattan is roughly 2 millions. Nearly same number of people come to Manhattan daily for work. So if whole of Manhattan comprise of only residential and commercial buildings, that makes up 1/3rd residential and 2/3rd commercial. I have lived in a house in a high rise building in downtown and the average size of the house is 1 bedroom with 2 windows and on average 2 people live in a house. So that makes up roughly 1.33 million windows in Residential buildings. At commercial buildings, windows per capita is much lower as more people share the space and roughly it comes down to 1 window for 10 people. So that makes up .266 millions windows in commercial establishments.
So in total there are roughly 1.6 million windows in Manhattan.
Help us improve. Please let us know the company, where you were asked this question :
Ans. Amazon Elastic Compute Cloud or EC2 provides scalable computing capacity in the AWS cloud. It can be used to create Virtual Environments , storage and configure. EC2 enables to upgrade or downgrade infrastructure according to the rules defined ( with fluctuation in latency, traffic etc )
Help us improve. Please let us know the company, where you were asked this question :
Ans. Latency is the delay incurred while communicating a message i.e the time took the message in transit over network.
processing time is the delay it took for the server to process the request.
Response time is the sum total of latency and processing time.
For example -
Let's say it takes 1 ms for the request to reach from client to server and similar 1 ms for the response to come back to client. Moreover it takes approx 10 ms for the application to process the request. So The response time would be outward latency + processing time + inward latency = 12 ms
Help us improve. Please let us know the company, where you were asked this question :
Ans. Amazon CloudWatch is a monitoring service for AWS cloud resources like Beanstalk and DB instances. We can use CloudWatch to monitor the state of resources, collect metrices, set alarms and appropriate response to the alarm state.
Help us improve. Please let us know the company, where you were asked this question :
Ans. Conversion means that the expression / literal / value of one type getting converted to other type.
Widening conversion is the conversion from Type A to Type B where B requires a wider space than A. For example - int to long, float to double, char to String etc. As the value moves to a wider space, there is no loss of information.
Narrowing conversion is the conversion from Type A to Type B where B requires a narrower space space than A. For example - int to long, float to double, char to String etc.As the value moves to a narrower space, there is a loss of information.
Help us improve. Please let us know the company, where you were asked this question :
Ans. Load Balancing is a provision to improve performance by reducing load on a single machine / server. Traffic or load is distributed among different machines and hence resulting in better performance / response time by leveraging more resources.
Failover is a provision to achieve better availability by switching to a backup server in case of failure.
Load Balancing aims as improving performance whereas failover aims at improving availability.
We can achieve both together by using a Load Balancing system which will isolate an instance in case of it's failure.
Help us improve. Please let us know the company, where you were asked this question :
LikeDiscussCorrect / Improve  load balancing  failover  load balancing vs failover  production support
Q1764. What happens to private variables during inheritance ?
Ans. By encapsulating it within another class and declaring it private. In such a case, it will only be accessible through parent class or parent class object.
Help us improve. Please let us know the company, where you were asked this question :
Ans. Java Programs are collection of objects that communicates with each other to get a task accomplished. To add to those objects, there are common spaces ( static i.e common for objects belonging to a class ) that are used too.
We can visualize objects as departments of an organization in real world. Just like Task gets initiated in one department and then files are moved across different departments to get work done. In a similar fashion, a task is initiated in one object ( having main method ) and then information ( through POJOs / DTOs ) is moved across objects to accomplish a task.
Help us improve. Please let us know the company, where you were asked this question :
LikeDiscussCorrect / Improve  objects  Java Programs are collection of objects  real life example of object communication
Q1770. Why iterators of an array list are fail fast ?