Conventions for Versioning Release
R16_01_00_01
R16 – ReleaseYear
01 – Release No in that Year
00 – Patch No in that Release
01 – Build No in that Release
Conventions for Versioning Release
R16_01_00_01
R16 – ReleaseYear
01 – Release No in that Year
00 – Patch No in that Release
01 – Build No in that Release
Basic Paradigms
What is POM.xml
A Project Object Model or POM is the fundamental unit of work in Maven. It is an XML file that contains information about the project and configuration details used by Maven to build the project. It contains default values for most projects. Examples for this is the build directory, which is target. Super POM is Mavens default POM. All POMs extend the Super POM unless explicitly set
Maven works in two modes in Command Prompt –
Interactive Mode – Takes command one after another
Batch Mode – takes all command at once
Archetype – Archetype is the one which defines the type of project and project structure. i.e. mvn archetype generate
ArtifactID – Specifies the name of the project.
GroupID – Group Id is one by which similar products or components are tied together under one groupId
i.e.
org.springframework org.apache org.commons
If you don’t specify the package name during creation it will take the groupId as package name for classes.
Types of Repo
Remote Repo is of Two type – Internal and External
Apart from the above we have one more repo called local repo.
Local Repo – Local repo is the one which we have in the development system under .m2 folder. Local repos would be holding old JARs even when you run clean command which does nothing more than cleaning .class files. Inorder to get rid of old JARs we need to purge
purge local repo
Other Notable Points
An artifact in maven is a resource generated by a maven project. Each maven project can have exactly one artifact like a jar, war, ear, etc.Each maven project has a unique identifier consiting of [groupId, artifactId, version]. When a maven project requires resources of another project a dependency is configured in it’s pom.xml using the above-mentioned identifier. Maven then automatically resolves the dependencies when a build is triggered. The artifacts of the required projects are then loaded either from the local repository, which is a simple directory in your user’s home, or from other (remote) repositories specified in you pom.xml.
Now the once mvn install is done the same snapshots are available in repository location as below
Two Dimensional Arrays (Array of Arrays)
//Seating Arrangement for 20 Seats int arrSeating[][] = new int[4][5]; //No of Items Produced in Hr By Days in Month int arrProdHrByDaysInMonth[][] = new int[30][24];
Two Dimensional Arrays(Array of Arrays of Arrays)
//No of Items Produced in Hr By Days in Month by Month int arrProdHrByDaysInMonth[][][] = new int[12][30][24];
Jagged Arrays
array of arrays such that member arrays can be of different sizes
Looping through ArrayList
//Iterate over Collection for (Iterator iterator = arrNames.iterator(); iterator.hasNext();) { String object = (String) iterator.next(); System.out.println(object); } //Iterate over array or Collection for (String string : arrNames) { System.out.println(string); } //Iterate over array for (int i = 0; i < arrNames.size(); i++) { System.out.println(arrNames.get(i)); } //Iterate over array using Temporary Variable for (int i = 0; i < arrNames.size(); i++) { String string = arrNames.get(i); System.out.println(string); }
Which one of the Above method is Faster?
All the methods are of same speed since the Traditional for loop uses Iterator inside.The performance difference is noted when there is change in data structure while doing random access like linkedlist is slower than arraylist when you use a traditional for loop since to traverse a 6th element in list it should start from all again
When there is a sorted Array and you should do a search in the sorted array then using BinarySearch is faster than Linear Search