Posted on 2004-04-10
Who can help me to think of how to write a method, given an int to it and return a string:
i got a class called sym:
public class sym
public static final int tCOMMA = 6; // ,
public static final int tMINUS = 7; // -
public static final int tDOTS = 8; // ..
public static final int tSLASH = 9; // /
at another class, i need to build a method, given an int says get_symbol(6), then the method would go to the class above to return the variable whose value is 6 in String.??? This sounds pretty familiar and easy..to me but i just somehow stuck~?