hi,
Wrapper Class
A wrapper or container class is a class, a data structure, or an abstract data type whose instances are collections of other objects. In Apex and Visualforce this type of class can be extremely useful but to a new developer the talk of wrapper classes may fly right over your head, it definitely did for me. Here I will supply a simple demo of how wrapper classes can be used.
example
public class Wrapper
{
private int x = 10;
private int y = 20;
public Wrapper()
{
}
public int add(int x, int y)
{
Wrapper.inside obj = new inside();
int sum = obj.add(x, y);
return sum;
}
private class inside
{
public int add(int x, int y)
{
return x + y;
}
}
}
Happy Coding :)