By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
455,805 Members | 1,350 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 455,805 IT Pros & Developers. It's quick & easy.

help me pls.!!

P: 1
i get

Exception in thread "main" java.lang.ArrayIndexOutOfBoundsException: 0
at Interface.main(Interface.java:346)
n i can't find out what is wrong..



//Start Main ()
public static void main (String [] args) {
//public native void cls();
//final static String ESC = "\033[";
//Runtime.getRuntime().exec("cls");
//System.out.flush();
AccountTransaction aT = new AccountTransaction();
Account ac = new Account();
Interface in = new Interface();
CustomerInfo c = new CustomerInfo();
String loginName = args[0];
String pCode = args[1];
c = ac.checkLoginPinCode(args[0],args[1]);
if ( loginName.equals("osama") && pCode.equals("maverick") ) {
System.out.println("Welcome Administrator");
in.adminMenu();
} else if ( c != null ) {
c = ac.checkLoginPinCode(args[0],args[1]);
System.out.println("Welcome , " + c.holderName.toUpperCase());
in.customerMenu(c);
} else {
System.out.println ("Your UserName & PinCode Is Incorrect");
//System.out.println("Enter Again : ");
}
}// End Main
Feb 6 '12 #1
Share this Question
Share on Google+
1 Reply


100+
P: 107
Can you please say how you executed this program?
Feb 8 '12 #2

Post your reply

Sign in to post your reply or Sign up for a free account.