public class Database {
private var _test:Number = 666
public function get test():Number {
return _test
}
public function set test(n:Number):void{
_test = n
}
}
public class Main {
public Main() {
var databse:Database = new Database()
trace(databse.test)
databse.test = 1
trace(databse.test)
}
}
Wednesday, 24 March 2010
getters and setters
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment