Question: When to examine the `InnerException` property of the `Exception` class and its derivatives? Microsoft's "Best practices for exceptions" doesn't provide any advise on when to examine for inner exceptions. Should I do it only when exceptions are rethrown and caught in my code? Should I do it always, even when I enclose in `try-catch` block standard functions like `System.IO.File.Move`?

Answer: 
At first, correct your `method2`

It has to be able to accept an array of `String` elements as parameter:

```
public static void  method2(String[] test)
  { 
    // this line is not needed -> String[] test = method1();
    for(String str : test)
        System.out.println(str); 
  } 

```

This way, you actually pass the data to the method, as your requirements described. A bonus is: it's re-usable for other `String` arrays as well.

Your `method1` has got a lot of redundant code. Just filter that out

```
public static String[] method1() 
{
     return new String[] {"sunshine","road","73","11"};
}

```

and now, your `main` method, just to link them. Change

```
public static void main(String args[]) 
{
  method1();
  method2(); // this will now cause a compilation error, because it expects a parameter
   System.exit(0); 
} 

```

to:

```
public static void main(String args[]) 
{      
  method2(method1());
   System.exit(0); 
} 

```

The way your code was originally built, `method1` was called two times, first in the `main` method, which was completely redundant, since the result wasn't used, second time in the `method2`, where it shouldn't be called, since the data should be passed as a parameter.
Proper way of doing the above is like below.You have to take the return value of the method one and insert it into method two as a parameter.

```
 public class Hihihi
    {

    public static void main(String args[]) 
    {
      String[] test=method1();
      method2(test);
    }                                 

    public static String[] method1() 
    {
         String[] xs = new String[] {"sunshine","road","73","11"};
         String[] test = new String[4];
         test[0]=xs[0];
         test[1]=xs[1];
         test[2]=xs[2];
         test[3]=xs[3];
         return test;
     }

       public static void  method2(String[] newtest)
      { 

        for(String str : newtest)
            System.out.println(str); 
      } 
    }

```