Q:

How to call intent, my activity name store in string value

i am store class name in string and i want to call store class name using intent. this code work for me but i don't want multiple if else condition. how to sol this problem.
thank in advance.
expListView.setOnChildClickListener(new OnChildClickListener() {

        @Override
        public boolean onChildClick(ExpandableListView parent, View v,
                int groupPosition, int childPosition, long id) {
            ActivityName = "";

            // for CSP Enrollment
            if (groupPosition == 0 && childPosition == 0) {

                ActivityName="CSP";
                SelectedIntentCreateFormClass();
            }

            // for Farmer Enrollment
            else if (groupPosition == 0 && childPosition == 1) {

                ActivityName="Farmar";
                SelectedIntentCreateFormClass();
            }

            // for Balance Inquiry
            else if (groupPosition == 1 && childPosition == 0) 
            {
                ActivityName="BalanceEnquiry";
                SelectedIntentClass();
            }

            // for Cash Withdrawal
            else if (groupPosition == 1 && childPosition == 1) 
            {
                ActivityName="CashWithdrawal";
                SelectedIntentClass();
            }

            // for cash deposit
            else if (groupPosition == 1 && childPosition == 2) 
            {
                ActivityName="CashDeposit";
                SelectedIntentClass();
            }

            // for mini statement
            else if (groupPosition == 1 && childPosition == 3) 
            {
                ActivityName="Ministatement";
                SelectedIntentClass();
            }

            // for Cash Summary
            else if (groupPosition == 2 && childPosition == 0) {

            }

            // for purchase register
            else if (groupPosition == 2 && childPosition == 1) {

            }

            // for Transaction List
            else if (groupPosition == 2 && childPosition == 2) {

            }

            // for Card Reader
            else if (groupPosition == 3 && childPosition == 0) {
            }

            else if (groupPosition == 3 && childPosition == 1) {

            }

            // TODO Auto-generated method stub
            Toast.makeText(
                    getApplicationContext(),
                    listDataHeader.get(groupPosition)
                            + groupPosition
                            + childPosition
                            + " : "
                            + listDataChild.get(
                                    listDataHeader.get(groupPosition)).get(
                                    childPosition), Toast.LENGTH_SHORT)
                    .show();
            return false;
        }
    });

here is my if else code... i don't want like this.
if (ActivityName.equalsIgnoreCase("BalanceEnquiry")) {

        ActivityIntent = new Intent(getBaseContext(), BalanceEnquiry.class);
    }
    else if (ActivityName.equalsIgnoreCase("CashWithdrawal")) {

        ActivityIntent = new Intent(getBaseContext(), CashWithdrawal.class);
    }
    else if(ActivityName.equalsIgnoreCase("CashDeposit"))
    {

        ActivityIntent = new Intent(getBaseContext(), CashDeposit.class);
    }
    else if(ActivityName.equalsIgnoreCase("Ministatement"))
    {

        ActivityIntent = new Intent(getBaseContext(), Ministatement.class);
    }
    else if(ActivityName.equalsIgnoreCase("CSP"))
    {

        ActivityIntent = new Intent(getBaseContext(), CSP.class);
    }
    else if(ActivityName.equalsIgnoreCase("Farmar"))
    {

        ActivityIntent = new Intent(getBaseContext(), Farmar.class);
    }

A:

you can use reflection 
 try {
            Class<?> cls =  Class.forName("your.package.name.BalanceEnquiry");
            startActivity(new Intent(this, cls));
        } catch (ClassNotFoundException e) {
            // TODO Auto-generated catch block
            e.printStackTrace();
        }

