I've been playing around with some coding and asci values. My program below will return an asci value generated by the Math.random method. Is there another method that i may use to display that value that the Math.random generates?
Please let me know if i didnt open this thread properly
public class CharList
{
public static void main(String[] args)
{
char myFirstChar;
myFirstChar = (char) (Math.random()); //A
//System.out.println(myFirstChar);
for (int i = 1; i<0; i++);
{
myFirstChar = 1;
//System.out.println(myFirstChar);
}
System.out.println(myFirstChar);
}
}


LinkBack URL
About LinkBacks

Reply With Quote

for example: 90.7456468755941 is the numerical value for: . So i'm gonna find a method that will round the number down