/*package other_package;

import java.sql.Connection;
import java.sql.ResultSet;
import java.sql.Statement;
import java.util.ArrayList;

import main_package.DataBaseMethods;
import main_package.DataBaseConnection;
import main_package.LoanInfo;

public class MyTest 
{
	static ArrayList<String> loanNoList=new ArrayList<>();
	static ArrayList<LoanInfo> loanEMIList;
	
	public static void main(String[] args) 
	{
		loanNoList=tempReducingLoanList();
		
		System.out.println("loan: "+loanNoList.size());
		for(String ll: loanNoList)
		{
			loanEMIList=new ArrayList<>();
			loanEMIList=new  DataBaseMethods().loanInstallment("personalloan",ll);
			for(LoanInfo ff: loanEMIList)
			{
				if(ff.getStatus().equalsIgnoreCase("paid"))
				{
					updateLoanInterest(ff.getSno(), ff.getInterestAmount(), ff.getInstallAmount(), ll);
				}
			}
		}
	}
	
	
	private static void updateLoanInterest(int sno, String interestAmount,double installAmount, String ll) 
	{
		int emi=(int) installAmount;
		try(Connection conn=DataBaseConnection.JAVAConnection())
		{
			Statement st=conn.createStatement();
			String qq="update loanpayment set interestAmount='"+interestAmount+"' where loanNo='"+ll+"' and amount='"+emi+"' and emi_no='"+sno+"'  ";
			System.out.println(qq);
			st.executeUpdate(qq);
		}
		catch(Exception e)
		{
			e.printStackTrace();
		}
	}


	//Reducing Approve Loan List
	public static ArrayList<String> tempReducingLoanList() 
	{
		ArrayList<String> list=new ArrayList<>();
		try(Connection conn=DataBaseConnection.JAVAConnection())
		{
			Statement st=conn.createStatement();
			String qq="select loanNo FROM personalloan where emiType='reducing' and status='approve' ";
			ResultSet rr=st.executeQuery(selectQueWithBranch(qq,branchId));
			while(rr.next())
			{
				list.add(rr.getString("loanNo"));
			}
		}
		catch(Exception e)
		{
			e.printStackTrace();
		}
		return list;
	}

}
*/