Question: I have calling a SQLite database method in my Activity. I have given the following code `final DatabaseHandler db=new DatabaseHandler(Lists.this);`to create an instance of the database in my Activity.I have not given the above code inside OnCreate(). I want to make the context null on calling the OnDestroy method. I have done the following:

```
@Override
protected void onDestroy() {
    // TODO Auto-generated method stub
    super.onDestroy();
    System.gc();
    details.clear();
    DatabaseHandler db=new DatabaseHandler(null);

}

```

Is It the correct way to make the context null?

Answer: 
// Two-dimensional array. 

```
int[,] array2D = new int[,] { { 1, 2 }, { 3, 4 }, { 5, 6 }, { 7, 8 } };

```

// The same array with dimensions specified. 

```
int[,] array2Da = new int[4, 2] { { 1, 2 }, { 3, 4 }, { 5, 6 }, { 7, 8 } };

```

// A similar array with string elements. 

```
string[,] array2Db = new string[3, 2] { { "one", "two" }, { "three", "four" },
                                    { "five", "six" } };

```

// Three-dimensional array. 

```
int[, ,] array3D = new int[,,] { { { 1, 2, 3 }, { 4, 5, 6 } }, 
                             { { 7, 8, 9 }, { 10, 11, 12 } } };

```

// The same array with dimensions specified. 

```
int[, ,] array3Da = new int[2, 2, 3] { { { 1, 2, 3 }, { 4, 5, 6 } }, 
                                   { { 7, 8, 9 }, { 10, 11, 12 } } };

```
```
int[,] array2D = new int[,] { { 1, 2 }, { 3, 4 }, { 5, 6 }, { 7, 8 } };

```

The sum2D() Method

```
private double sum2D(double[,] ar)
{
 double sum = 0.0;

 foreach (double d in ar)
      sum += d;

 return sum;
}

```