Danny Alphones wrote:can you either tell me where i can learn about arraylists or show me an example of how i could write 7 if statements (or call a method 7 times).
Tutorials on arrays... https://docs.oracle.com/javase/tutorial/java/nutsandbolts/arrays.html
Then you can rewrite the methods. To make the tasks simpler, can you write a method that takes an ArrayList parameter? How about one that returns the first element of the ArrayList?
Scanner was introduced in 2004. Nobody ought to use a version of Java® so old that it doesn't have Scanner. If the tutorial you are using is old enough not to mention Scanner it should not be used either.
Danny Alphones wrote:i dont think i can use the scanner because i am using a old version of eclipse and java so how would i do it other wise.
That looks mistaken; I am pretty sure the first class name will fail to compile after import. Just because you can get away with imports ending * doesn't make them a good thing, anyway.
Danny Alphones wrote:yeah i found out that i could use a scanner if i wrote java.util.U*; instead of java.util.Scanner;
Anyway, if you are using Eclipse, then forget about imports and that sort of thing. You write something like
Sca ctrl-space and Eclipse will give you a dropdown list. That will have java.util.Scanner near its top, so you click (or maybe double‑click) Scanner and Eclipse will insert the import declaration for you in the correct place. You will not need to think about imports at all.
I think you have reached the stage where you need to resort to desperate measures.
You also need to be more careful what you are thinking about.
That is incorrect. Look carefully at the operators.
About 12 hours ago, you wrote:7 sense i is repeating until it is more than 7
Learn the basic form of a for loop, and work out what the different numbers on the left and in the middle should be.
here is my code....