Difference between Setter Injection and Constructor Injection

Partial dependency In Setter Injection, partial injection of dependencies can possible, means if we have 3 dependencies like int, string, long, then its not necessary to inject all values if we use setter injection. If you are not inject it will takes default values for those primitives. In Constructor injection, partial injection of dependencies cannot possible, because […]

Difference between Abstract Class and Interface in Java

1. Definition of Abstract Class and Interface An abstract class is a special kind of class that cannot be instantiated. An abstract class is only to be sub-classed (inherited from). In other words, it only allows other classes to inherit from it but cannot be instantiated. In simple words, it is a kind of contract […]

Difference between Array and ArrayList in Java

1. Size Array is fixed size datastructure where ArrayList is dynamic size datastructure. We need to provide size of Array during creation of Array Object, Where ArrayList no need to provide size of it.  String [] userArray= new String [10]; ArrayList userListObj=new ArrayList(); 2. Data Types Array can contain primitive(ie int, float, etc.) as well […]

Oracle PL/SQL – DROP FUNCTION Statement

Oracle PL/SQL – DROP FUNCTION Statement This article will help you to understand “Oracle PL/SQL – DROP FUNCTION Statement” with example and description. The DROP FUNCTION statement drops a standalone stored function from the database. Example 1. DROP function example Here first we will create function get_current_month. Then we will DROP it using DROP FUNCTION […]

Oracle PL/SQL – ALTER FUNCTION Statement

Oracle PL/SQL – ALTER FUNCTION Statement This article will help you to understand “Oracle PL/SQL – ALTER FUNCTION Statement” with example and description. Oracle PL/SQL – ALTER FUNCTION statement explicitly recompiles a standalone function. Sometimes because of ALTER TABLE on table being used in function, the function becomes INVALID. We can check the status of […]

Oracle PL/SQL – Create Function Example

Oracle PL/SQL – Create Function Example This article will help you to understand “Oracle PL/SQL – Create Function” with examples and description. Oracle PL/SQL – CREATE FUNCTION statement is used to create user defined function. It’s also known as stored function or user function. User defined functions are similar to procedures. The only difference is […]

Towers Of Hanoi Algorithm

Towers Of Hanoi Algorithm The towers of hanoi is a mathematical puzzle. We have three towers (or rods or pegs), and a number of disks of different sizes which can slide into any tower. The puzzle starts with the disks on one tower in ascending order of size, the smallest at the top, making a […]

Selection Sort Algorithm

Selection Sort Algorithm Selection sort is a sorting algorithm, specifically an in-place comparison sort. It has O(n2) time complexity, making it inefficient on large lists, and generally performs worse than the similar insertion sort.  Selection sort is noted for its simplicity, and it has performance advantages over more complicated algorithms in certain situations, particularly where […]

Quick Sort Algorithm

Quick Sort Algorithm Quick sort (sometimes called partition-exchange sort) is an efficient sorting algorithm. It is a commonly used algorithm for sorting. When implemented well, it can be about two or three times faster than its main competitors, merge sort and heap sort. Quick sort is a divide and conquer algorithm. Quick sort first divides […]

Merge Sort Algorithm

Merge sort algorithm is an efficient, comparison-based sorting algorithm. Most implementations produce a stable sort, which means that the implementation preserves the input order of equal elements in the sorted output. Merge sort is a divide and conquer algorithm that was invented by John von Neumann in 1945. Conceptually, a merge sort works as follows: […]

Pin It on Pinterest