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 VPC is devided into multiple subnets. Subnet in a particular VPC could be public or private.
For Example - A particular account may have multiple vpc's for each of the business type. For each Business or VPC , One can have different subnets to cater to each department so that access across departments could be restricted. But still there could be identities that have control over different subnets. Moreover we could have multiple subnets for each department so as to have distinguished public and private networks having different types of applications ( public facing or internal consumption )
Help us improve. Please let us know the company, where you were asked this question :
Ans. List - Members are stored in sequence in memory and can be accessed through index.
Set - There is no relevance of sequence and index. Sets doesn't contain duplicates whereas multiset can have duplicates.
Map - Contains Key , Value pairs.
Help us improve. Please let us know the company, where you were asked this question :
Ans. Java doesn't support multiple inheritance. Interfaces does't facilitate inheritance and hence implementation of multiple interfaces doesn't make multiple inheritance.
Help us improve. Please let us know the company, where you were asked this question :
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 :
Q152. 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 :
Q153. How many bits are used to represent Unicode, ASCII, UTF-16, and UTF-8 characters?
Ans. Unicode requires 16 bits and ASCII require 7 bits. Although the ASCII character set uses only 7 bits, it is usually represented as 8 bits. UTF-8 represents characters using 8, 16, and 18 bit patterns. UTF-16 uses 16-bit and larger bit patterns.
Help us improve. Please let us know the company, where you were asked this question :
Ans. You cannot inherit a constructor. That is, you cannot create a instance of a subclass using a constructor of one of it's superclasses. One of the main reasons is because you probably don't want to override the superclasses constructor, which would be possible if they were inherited. By giving the developer the ability to override a superclasses constructor you would erode the encapsulation abilities of the language.
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. This Error is thrown when the Java Virtual Machine cannot allocate an object because it is out of memory, and no more memory could be made available by the garbage collector.
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 :