sorry guys. i just got back from my class.
ok the point of this program is to type "java Lotto (mm or sl, which is the type of lotto) (#of tickets)" in the command line
and the output is...
Type: Posts; User: tlckl3m3elmo
sorry guys. i just got back from my class.
ok the point of this program is to type "java Lotto (mm or sl, which is the type of lotto) (#of tickets)" in the command line
and the output is...
Oh like i didn't type anything?
Well I tried typing "java Lotto sl" it just gives me a blank. sl should be my first element for my array args[]
why do you keep on asking me for the full text of the error message? i already did! thats all it says to me. and what do you mean where do i check if there are any elements in the args array?
uh you asked where i test my methods. I compiled it with no error messages. but when i try to run the program it gives me the arrayout of bound exception:0 msg
i did post it
/students/mau1> java Lotto
Exception in thread "main" java.lang.ArrayIndexOutOfBoundsException: 0
at Lotto.main(Lotto.java:67)
this is my error when i type "java Lotto" in my...
oh sorry norm. and itts not comparing 2 strings. i have the boolean method, but that doesnt matter for my loop.
and i test my code in Hills server at my college using SSH.
i haven't solved it. I think there's something wrong with my for loop to generate the number of lotto tickets.
it worked up until i tried putting in the loop.
import java.io.*;
import java.util.*;
public class Lotto
{
//*********commandLine1()**********
public static boolean commandLine1(String str)
{
...
i can't get it to loop the number of tickets that the user puts in. and right now i keep on getting an ArrayoutofBoundException:0 in my main. i can't see what's wrong with it
import java.io.*;...
Why does it give me a 0 when my range is specifically 1~56?
Code:
//**********random()***************
public static int random(int a, int b)
{
return((int)((b -...