i want to write a program as it takes input strings from the user(for example bhas1234@gmail.com) and it prints as bhas1234(leaves the characters after @) when i write the below code it shows the following error:

```
import java.util.*;

import java.util.Scanner;

public class Name {

    public static void main(String[] args) {

                Scanner take =new Scanner(System.in);
                int j=0;
                String[] sh;
                String gmail;
                for(j=0;sh[j]!="exit";j++)
                {
                sh[j]= take.nextLine();
                int i=sh[j].indexOf('@');
                gmail= sh[j].substring(0,i);
                System.out.println(gmail);
                }

        }

    }

```

it shows the error as

> 
> Exception in thread "main" java.lang.Error: Unresolved compilation problems: 
>  The local variable sh may not have been initialized
> 
> 
>