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. A Region is a Geographical entity like US-East , US-West etc. Each Region may have multiple availability zones where each zone comprise of 1 or more Data Center located with each other.
Edge Locations are the sites that hosts cached content for faster delivery and for saving network traffic as they feed content from sites that are local or near to consumption.
Help us improve. Please let us know the company, where you were asked this question :
LikeDiscussCorrect / Improve  aws region  aws availability zone  aws edge location  region vs availabillity zone
Q93. What are the different types of inner classes ?
Ans. Checked exceptions are the exceptions for which compiler throws an errors if they are not checked whereas unchecked exceptions are caught during run time only and hence can't be checked.
Help us improve. Please let us know the company, where you were asked this question :
Ans. In preemptive scheduling, highest priority task continues execution till it enters a not running state or a higher priority task comes into existence. In time slicing, the task continues its execution for a predefined period of time and reenters the pool of ready tasks.
Help us improve. Please let us know the company, where you were asked this question :
Q99. What one should take care of, while serializing the object?
Ans. One should make sure that all the included objects are also serializable. If any of the objects is not serializable then it throws a NotSerializable Exception.
Help us improve. Please let us know the company, where you were asked this question :
Ans. Though It's often confused with each other, Object Creation ( Instantiation ) and Initialization ( Construction ) are different things in Java. Construction follows object creation.
Object Creation is the process to create the object in memory and returning its handler. Java provides New keyword for object creation.
Initialization is the process of setting the initial / default values to the members. Constructor is used for this purpose. If we don't provide any constructor, Java provides one default implementation to set the default values according to the member data types.
Help us improve. Please let us know the company, where you were asked this question :
Ans. An interface without any method declaration is called as marker interface. there are 3 in-built interfaces in JVM i.e. serializable, clonable, remote
Help us improve. Please let us know the company, where you were asked this question :
Ans. Factory Pattern deals with creation of objects delegated to a separate factory class whereas Abstract Factory patterns works around a super-factory which creates other factories.
Help us improve. Please let us know the company, where you were asked this question :
Ans. Builder is a creational Design Pattern whereas Composite is a structural design pattern. Composite creates Parent - Child relations between your objects while Builder is used to create group of objects of predefined types.
Help us improve. Please let us know the company, where you were asked this question :
Ans. Factory is a creational design pattern whereas Strategy is behavioral design pattern. Factory revolves around the creation of object at runtime whereas Strategy or Policy revolves around the decision at runtime.
Help us improve. Please let us know the company, where you were asked this question :
Ans. As we only downcast class in the hierarchy, The ClassCastException is thrown to indicate that code has attempted to cast an object to a subclass of which it is not an instance.
Help us improve. Please let us know the company, where you were asked this question :
Ans. Garbage Collector wont remove a strong reference.
A soft reference will only get removed if memory is low.
A weak reference will get removed on the next garbage collection cycle.
A phantom reference will be finalized but the memory will not be reclaimed. Can be useful when you want to be notified that an object is about to be collected.
Help us improve. Please let us know the company, where you were asked this question :
Ans. The jsp scriptlet tag can only declare variables not methods whereas jsp declaration tag can declare variables as well as methods.
The declaration of scriptlet tag is placed inside the _jspService() method whereas The declaration of jsp declaration tag is placed outside the _jspService() method.
Help us improve. Please let us know the company, where you were asked this question :
LikeDiscussCorrect / Improve  j2ee   jsp   scriptlet tag   declaraation tag   web application
Ans. A source of possible errors in parallel programming, where one thread can cause an error in another thread by changing some aspect of the state of the program that the second thread is depending on (such as the value of variable).
Help us improve. Please let us know the company, where you were asked this question :
Ans. Generalization or UpCasting is a phenomenon where a sub class is prompted to a super class, and hence becomes more general. Generalization needs widening or up-casting. Specialization or DownCasting is a phenomenon where a super class is narrowed down to a sub class. Specialization needs narrowing or down-casting.
Help us improve. Please let us know the company, where you were asked this question :
LikeDiscussCorrect / Improve  java   data types   casting  type casting   up casting  type casting   downcasting  type casting   generalization   specialization Asked in 2 Companies
Q119. Can we call the garbage collector explicitly ?
Ans. Yes, We can call garbage collector directly but it doesn't guarantees that the gc will start executing immediately. This gc( ) method appears in both Runtime and System classes of java.lang package.
Help us improve. Please let us know the company, where you were asked this question :
Ans. Both belong to the class as a whole and not to the individual objects. Static methods are explicitly called for execution whereas Static block gets executed when the Class gets loaded by the JVM.
Help us improve. Please let us know the company, where you were asked this question :