View Single Post
  #3  
Old 02-06-2008, 04:28 AM
cbk1994 cbk1994 is offline
the fake one
cbk1994's Avatar
Join Date: Mar 2003
Location: San Francisco
Posts: 10,718
cbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond repute
Send a message via AIM to cbk1994
Quote:
Originally Posted by PrinceOfKenshin View Post
Okay well i just started AP Computer Science at my school and we are learning Java and i was wondering if gs2 had a feature java does. And that is the whole implementing classes.

So that if i make a class called getbalance

PHP Code:
public double getbalance(double amount) {
balance =amount;
return 
balance;

so that in the main method i could do

PHP Code:
public static void main(String[] args) {
System.out.println(BankAccount.getbalance());

so that i call the method getbalance of the object BankAccount and it will return the vaule of balance.

Is it possible to do that with gs2 and how?
Whack your teacher in the face for not teaching my style of styling code
__________________
Reply With Quote