an serious doubt how to call a method using array of objects? here class bank have b1 as a array of object... i need to call method get() for two objects b1.get()? it showing error....Add code tags and sort out indentation. CR[/edit] [ July 20, 2008: Message edited by: Campbell Ritchie ]
Which class is "get" a member of, and why is there a "new" on the second line -- what class are you trying to create an instance of?
Are you trying to create an array with two "bank" objects in it? That would look like
bank b1 = new bank; // Create an empty array with room for two "bank" objects bank = new bank(); // Put a new "bank" into the first space in the array bank = new bank(); // and another in the second
When you write lines lines like this:
These lines show the correct way to call methods in the class "bank" named "cal" and "dis", each of which accepts an "int" parameter. Is this what you're trying to do?