Java Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
User Name:
Password:
Remember me
 
Go Back   Dev Articles Community ForumsProgrammingJava Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Display Modes
 
Unread Dev Articles Community Forums Sponsor:
  #1  
Old December 15th, 2006, 10:40 AM
nabil1983 nabil1983 is offline
Contributing User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Apr 2005
Posts: 36 nabil1983 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 3 h 7 m 44 sec
Reputation Power: 4
Getting compile errors!!!

Hello
i've been trying to compile this class but for some reason it keeps giving me errors. At first the error was class or interface required, which i managed to fix and now im getting other errors.
Can neone help please::::

Code:
package Bank;

import java.io.*;

public class Bank
{
	
	/*arrays created and initialised*/
	Array accountList[] = new Array[21];
	Array costumerList[] = new Array[21];
	
	public String bankName = "The World Ban''K''";
	
	/*public SavingsAccount (String ACCOUNTNUMBER)
 	{
 	
	
	}*/
	
	
	
	
public void bankName(String bankName)
    {
    	this.bankName = bankName;
    }
    
/*accessor method*/
public void getBankName()
    {
    	return bankName;
    }
    
    
/*public String getAccounts(accountList[]) 
    {
		
			for (int i=0;i<=20;i++)
			{
			
				return accountList[i];
		
			}
	}
	
public String getCustomers(costumerList[]) 
    {
		
			for (int i=0;i<=20;i++)
			{
			
				return costumerList[i];
		
			}
	}*/
    
    
/*mutator methods*/
public void creditAccount()
    {
    	balance = balance + credit;
    }
    
public void debitAccount()
    {
    	
    	if(balance >= 0){
    	
    						balance = balance - debit;
    	
    	  				}
    }
/*accessor/print method*/
public void printCustomers() {

	for (int i=0;i<=20;i++)
			{
			
				System.out.println(costumerList[i]);
		
			}
	
			
		}
		
public void printAccounts() {

	for (int i=0;i<=20;i++)
			{
			
				System.out.println(accountList[i]);
		
			}
	
			
		}
		
	
	
/*public void printAccountCostumer() {

	for (int i=0;i<=20;i++)
			{
			
				System.out.println(costumerList[] + accountList[i]);
		
			}
	
			
		}*/
		
public static void tui() {

		System.out.println("welcome to The Ban''K'''s database");
		System.out.println("\n Please select from the available options \n");
		
		System.out.println(" 1. View existing accounts");
		System.out.println(" 2. View existing account holders");
		System.out.println(" 3. View existing accounts and their ownerships");
		System.out.println(" 4. Search for a costumer");
		System.out.println(" 5. Add a new costumer and create a new account for them");
		System.out.println(" 6. Exit system");
		

	}
	
	public static void main(String[] args) {
		
		
	
	char choice = '0';
	
			do {
			showMenu();

			
			try {
				
				choice = (char) System.in.read();
				
				} catch (IOException e) {
				
				
			}
			
			switch (choice) {
			
			
			
			case '1':
				printAccounts();
				break;
			
			case '2':
				printAccountHolders();
				break;
			
			case '3':
				printAccountAndOwnership();
				break;
			
			case '4':
				System.out.println("Input the costumer's costumer ID");
				printAccountHolder();
				break;
			
			case '5':
				createAccount();
				break;
			
			case '6':
			system.exit(0);
				break;
				
			

			}

		} while(choice >'0' && (choice < '7');
	
	
	}
		
	

public String toString()
 		{
 			return "Account number: " + ACCOUNTNUMBER + "Account holder: " +
 			ACCOUNTHOLDER + " Account balance: " + balance + " Interest rate: "
 			+ interestRate;
 		}
 		}

Reply With Quote
  #2  
Old December 16th, 2006, 11:58 PM
daniel_g daniel_g is offline
Contributing User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Mar 2006
Posts: 60 daniel_g User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 21 h 3 m 50 sec
Reputation Power: 3
Where or what is the error your getting?
It would help if you posted it, as it contains important data such as the line where is happening.

I'm not trying to be hard on you, but for example, if you have a class called Array, then you are going to get different errors than me, since I don't have a class called Array.
Code:
Array accountList[] = new Array[21];
Array costumerList[] = new Array[21];

Last edited by daniel_g : December 17th, 2006 at 12:03 AM.

Reply With Quote
  #3  
Old December 28th, 2006, 01:36 PM
FUBAR FUBAR is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Dec 2006
Posts: 2 FUBAR User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 31 m 59 sec
Reputation Power: 0
If anything, you're being reasonable to ask for the actual compile errors. Nobody will read through that code to look for errors. That's what compilers are for!

Quote:
Originally Posted by daniel_g
Where or what is the error your getting?
It would help if you posted it, as it contains important data such as the line where is happening.

I'm not trying to be hard on you, but for example, if you have a class called Array, then you are going to get different errors than me, since I don't have a class called Array.
Code:
Array accountList[] = new Array[21];
Array costumerList[] = new Array[21];

Reply With Quote
Reply

Viewing: Dev Articles Community ForumsProgrammingJava Development > Getting compile errors!!!


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 1 hosted by Hostway
Stay green...Green IT