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. Deserialization. In serialization, we can save the object of a byte stream into a file or send over a network. Suppose if you serialize the Singleton class, and then again de-serialize that object, it will create a new instance, hence deserialization will break the Singleton pattern.
To overcome this issue, we need to override readResolve() method in the Singleton class and return the same Singleton instance.
Help us improve. Please let us know the company, where you were asked this question :
Ans. VPC stands for Virtual Private Cloud. You can define a VPC and subnets for a region in AWS and that can be used to access shared resources on the cloud. For eg: API gateway to access any file on S3.
Help us improve. Please let us know the company, where you were asked this question :
Ans. Second level cache is shared between sessions. Hibernate by default uses first level cache. Second level cache need to be configurd to use.
There are several second level cache e.g eh cache,jboss cache etc.
Help us improve. Please let us know the company, where you were asked this question :
Ans. There are four main OOP concepts in Java. These are:
Abstraction. Abstraction means using simple things to represent complexity. We all know how to turn the TV on, but we don?t need to know how it works in order to enjoy it. In Java, abstraction means simple things like objects, classes, and variables represent more complex underlying code and data. This is important because it lets avoid repeating the same work multiple times.
Encapsulation. This is the practice of keeping fields within a class private, then providing access to them via public methods. It?s a protective barrier that keeps the data and code safe within the class itself. This way, we can re-use objects like code components or variables without allowing open access to the data system-wide.
Inheritance. This is a special feature of Object Oriented Programming in Java. It lets programmers create new classes that share some of the attributes of existing classes. This lets us build on previous work without reinventing the wheel.
Polymorphism. This Java OOP concept lets programmers use the same word to mean different things in different contexts. One form of polymorphism in Java is method overloading. That?s when different meanings are implied by the code itself. The other form is method overriding. That?s when the different meanings are implied by the values of the supplied variables. See more on this below.
Help us improve. Please let us know the company, where you were asked this question :
Ans. Generics are a facility of generic programming that were added to the Java programming language in 2004 within J2SE5.0. They allow "a type or method to operate on objects of various types while providing compile-time type safety.
Help us improve. Please let us know the company, where you were asked this question :
Ans. OOPs or Object Oriented Programming is a Programming model which is organized around Objects instead of processes. Instead of a process calling series of processes, this model stresses on communication between objects. Objects that all self sustained, provide security by encapsulating it's members and providing abstracted interfaces over the functions it performs. OOP's facilitate the following features
1. Inheritance for Code Reuse
2. Abstraction for modularity, maintenance and agility
3. Encapsulation for security and protection
4. Polymorphism for flexibility and interfacing
Help us improve. Please let us know the company, where you were asked this question :
Ans. Selenium WebDriver is a tool for automating web application testing.It helps in replicating the manual tester behavior like keyboard entry, mouse events etc and then matching the output against the expected.
Help us improve. Please let us know the company, where you were asked this question :
Ans. Inner join is the intersection of two tables on the condition defined by the where clause i.e will get records from both tables matched by a column.
Outer join is the union of two tables i.e will get all records from both tables and will put null in the columns where related records are not present.
Left Outer join is the left union of two tables i.e all records from the table on the left and values from the right table for related records else null for the columns from right table.
Right Outer join is the right union of two tables i.e all records from the table on the right and values from the left table for related records else null for the columns from left table.
Help us improve. Please let us know the company, where you were asked this question :
Q24. Can we have try statement without catch? If try statement contains return will the finally block be executed? What happens if there is an exception inside finally block?
Ans. jQuery is a cross platform JavaScript library designed to simplify the client-side scripting of HTML. JQuery is the most popular JavaScript library.
Help us improve. Please let us know the company, where you were asked this question :
Ans. Stored procedures are a batch of SQL statements along with programming constructs ( if else, loops etc ) and stored as a single program that can be called by different clients and hence reused.
Help us improve. Please let us know the company, where you were asked this question :
Ans. <a href="http://www.programcreek.com/2009/02/diagram-for-hierarchy-of-exception-classes/" rel="nofollow">http://www.programcreek.com/2009/02/diagram-for-hierarchy-of-exception-classes/</a>
Help us improve. Please let us know the company, where you were asked this question :