How to fix Syntax error insert '}' to complete block : I'm keep getting an error with my code. I'm creating a simple user-defined function for Neo4j. Can anyone help me with this? No matter what I try I get "Syntax Error: Insert "}" to complete block." When I insert "}" it gives me an error saying that my code is "unreachable" and when I add a bracket to make it reachable it takes me back to the first error and it just loops. 

Here is my code:

    public class Join {

	
	static Cipher cipher;
	
    @UserFunction
    @Description("example.DES ,, Decryption of any input values.")
    
    public byte[] DES( @Name("set1") List<String> strings1) {

        for (int i = 0; i < strings1.size(); i++) {
            String dot;
            dot = strings1.get(i);
         
            KeyGenerator keyGenerator = KeyGenerator.getInstance("AES");
    		keyGenerator.init(128);
    		SecretKey secretKey = keyGenerator.generateKey();
    		cipher = Cipher.getInstance("AES");

    		       
    		String encryptedText = encrypt(dot, secretKey);
    		System.out.println("Encrypted Text After Encryption: " + encryptedText);
    		
    	}
    

    	public static String encrypt(String dot, SecretKey secretKey)
    			throws Exception {
    		byte[] plainTextByte = dot.getBytes();
    		cipher.init(Cipher.ENCRYPT_MODE, secretKey);
    		byte[] encryptedByte = cipher.doFinal(plainTextByte);
    		Base64.Encoder encoder = Base64.getEncoder();
    		String encryptedText = encoder.encodeToString(encryptedByte);
    		return encryptedText;
    	} 
   
        }
