Hi all, I'm new to Java programming(and programming itself) and was looking for a website such this, to get some help once in a while and find some answers to my questions...I read the forum's principles, won't ask u to write my programs at all lol, just need to make myself better.
anyway, for a start, I have a question about manipulating the numbers of a long int...like
how do I choose to work with the second number from right of a 10 digits number?
I have arrays in mind...manipulating the numbers would have been easy if I choose each number go to one slot of my array ,but I don't like it this way, cuz when I run my program, it asks from the user to to put number 1, press enter, then put number 2, press enter and so on, as I wrote it here:
Scanner x = new Scanner(System.in);
int num[] = new int[10];
for( int counter=1; counter<num.length; counter++){
num[counter] = x.nextInt();
I wanted the user to put the whole number in, and then I manipulate for example 4th digit of the number from left!
And also, needed to know how I can make it to accept exactly between 8-12 digits, nothing more or nothing less...
hope I'm not breaking any rules
, if I am, let me know!