Saturday, 22 October 2011

Collection Interfaces tutorial and collection Interface video free download

Collection Interfaces video tutorial




It is the root of collection hierarchy. A Collection includes a group of objects known as elements. Some Collection classes allows duplicate elements, and others do not. Some are ordered and others are unordered. All collection class implement Collection interfaces or subinterfaces.

Signature:
public interface Collection<E> extends Iterable<E>

Collection Interface extends Iterable interface

int size():Returns the number of elements in collection.

boolean isempty():Returns true only if collection is empty.

boolean Contains(Object o):Returns only if specified element is in the collection.

boolean add(Element e):This is used to add a single element to collection.This method true only when the element is added.

boolean remove(Object o):This element will remove specified element from collection. Returns true if the element is removed from collection.






Hash map tutorial and Hash map video free download

 Video sample screenshot:

 













Hash Map is like Hashtable which stores key/ value pairs. It implements Map interface and we can use all operations of Map interface. It permits null values and null key. The Hash Map class is almost equivalent to Hashtable, except that its unsynchronized and permits nulls. The order of elements is not guaranteed.

Following is the signature of HashMap class:
Public class HashMap extends AbstractMap implements Map, Cloneable, Serializable

HashMap constructor can be specified with -initial capacity and load factor. The capacity of HashMap gives the storage capacity and size() gives the actual elements present in the HashMap. The intial capacity gives the starting capacity of Hash Map when it is created. The load factor gives at what rate the capacity must be increased when the existing capacity gets exhausted. The default load factor is 0.75

There are four constructors in the class HashMap.

HashMap():
It creates an empty HashMap object with an initial capacity of 10 and default load capacity of 16.

HashMap(int cap):It creates an empty Hash Map object with an intial capacity specified as "cap" and a default load capacity of 16.

HashMap(int cap, float loadfactor): It creates an empty HashMap object with intial capacity specified as "cap" and a load capacity specified as "loadcap".

HashMap(Map m1):It creates a HashMap object with the elements of another Map class specified as "M!"




Array list and arraylist video free download














Click here to download video on arraylist

Click here to download video on arrayList display

 Array List is a subclass of AbstractList and implements List. Following is the signature of ArrayList:

public class ArrayList extends AbstractList implements List, Cloneable, Seriablizable

ArrayList includes a feature called dynamic arrays that can increase dynamically as and when needed. In other words, ArrayList is a dynamic array that stores objects. ArrayList size automatically increases when we add elements and shrinks when we remove elements.


Tuesday, 18 October 2011

Bug life cycle video free download
















 

Bug life cycle:
The different states of bug are summarized as follows:
1)      New: When the bug is posted for first time it will be in new  state .In this state bug is not approved state.

2)      Open: When the bug is posted for first time lead will check whether the bug is genuine or not, if it is genuine he will approve the bug and change the state as open. 

3)      Assign: Once the lead assigns the state as open he will assign the bug to the corresponding team. The state of the bug is now assign.

4)      Test: Once the developer fixes the bug, he need to assign to testing team for next  round of testing. Before releasing the software with bug fix he will assign the state as Test.

5)      Deferred: The bug is in deferred state means it is to fixed in next  releases. The reason for changing the defect to deferred state has many factors. Some of them are priority may be low,  lack of the time for release or the bug may not have major effect on the software. 

6)      Rejected :If the developer feels the bug is not genuine he rejects the bug, then the state of bug is  rejected. 

7)      Verified: If the bug is not present in the software he approves that bug is approved and changes the state to verified.

8)      Reopened: If the bug is fixed by developer and the tester still finds the bug he will change the status to reopened. Once the bug is reopened it  passes the lifecycle once again.

9)      Closed: once the bug is fixed by developer, if it s  no longer exists in the software he changes the status to closed. This state means bug is fixed, tested and approved that bug does’nt exists no more.

Monday, 17 October 2011

Type casting in java video free download












Type Casting:
We can assign primitive datatypes one to another. This is called casting. The process of casting is governed by some rules.

Rules of Casting:
1. The data types must be compatible. That is a boolean value is incompatible and cannot be assigned to any other type.

2. A datatype of lower size can be assigned to data type of higher size and is done implicitly.

3.A data type of higher size cannot be assigned to data type lower size implicitly and is done explicitly.

Implicit Casting:

When we assign variable of data type of  lesser memory size to variables of higher memory size, the system does casting implicitly. For example:
int x=100;
double d=x;

In the above case casting is done implicitly by the system as we are assigning x of data type int to d of data type double. This is called 'widening conversion' and is done implicitly.

Explicit casting:
  When we assign variables of data type of higher memory size to variables of lesser memory size, system does not perform implicit casting. We have to do ourselves the casting. This is called explicit casting. In explicit casting data will be truncated or precison of the value is lost. For example:

double d=10.5;

//int x=d;                       //raises compilation error

int x=(int) d;

In the above example, casting is done explicitly by us as we are assigning d of data type double to x of data type int. This is called narrowing conversion.

Garbage collection in java , Garbage collection video free download











Click here for Garbage Collection video free download

Garbage Collection and its uses:

The objects that are not used and not referenced further in the program are treated as garbage and can be removed so that the memory is best utilized. That is , memory can be recycled and thus memory leaks does not occur.

It is difficult to know when the memory will be freed of an object in a process. Garbage collection relieves the programmer from the burden of freeing the allocated memory. Java does this job implicitly. 

We can advice the JVM to do garbage collection using gc() method of System class as follows:
System.gc();

Garbage collector is a low priority thread and is executed periodically whenever the processor is free. The garbage collector is a two phase process Mark and Sweep. Mark is the first phase, it marks the objects that are not used or referenced in the program.(known as garbage). In the next process sweep the unused objects are destroyed and the memory is freed.

One of the important features of Java is implicit memory management where memory is automatically created or destructed. For memory destruction, Java includes a concept called garbage collection. Even though every thing is implicit where programmer productivity increases , sometimes it is necessary to know the particulars of heap memory variable available, used and remaining;it may be necessary when we want to know the program size and availability of the memory.

Saturday, 15 October 2011

What is an object in java?



An object is an instance of a class. An object is known by a name and every object contains a state. The state is determined by the values of attributes(variables). The state of an object can be changed by calling methods on it.

The sequence of state changes represents the behaviour of the object.

An object is a software entity that combines a set of data with set of operations to manipulate the data. A class defines the type of object. That is, each object belongs to some class and object is also called an instance.

Click here to download  objects video in java