0
Why a 't'?
Can someone explain where the 't' comes from? The name of the array is 'primes'. Thanks!
4 Antworten
+ 2
t is just a variable used in this program.U can also change it.
+ 1
Did you ask about generics?
If i good understand your question, you can trying call some method for table like "int a[]" but this method is for generics like "a<>[]",
So if i good understand, you should change a method or change a table type.
For generics you can write something like this:
primes<T>=new ArrayList<T>();
where 'T' is type of your generic, for example: String, int, double, char, ...., Object or everything what you want
If i don't understand your question - i am sorry and forget it... or redefine your question
+ 1
"t" is just new variable to depute array for print out the result
+ 1
Thank you both!! I understand now it works pretty much the same as the scanner. Define and name the array first and when declaring it you make a variable with another name.