milil 24 Newbie Poster

First of all you don't need a scaner.
You need to have for loop with algorithm to see is it odd or not inside that loop.
So you will have something like this:

for(i=1; i<=15; i++)
{
// if you get remainder of division with 2 then that is odd number
int result = (int) (i % 2);
//if result is 1 then that is odd number so you just write it down
if (result == 1) {
System.out.println(i);
}
}
milil 24 Newbie Poster

If it is a array it will be something like this.

int array [] = {9876,7698,7676,9898,987698,769876};

        for (int x = 0; x < array.length; x++) {
            String number = array[x] + "";
            String firstTwoNumbers = number.substring(0,2);

            int numberLength = number.length();

            String lastTwoNumbers = number.substring(numberLength - 2, numberLength);

            if (firstTwoNumbers.equals("98")) {
                // it starts with 98...
            }

            if (lastTwoNumbers.equals("76")) {
                // it ends with...
            }
        }
milil 24 Newbie Poster

Because they have same value if you set one to "word1" and two to "word2" it will return false.
If you want to compare one and two as objects try this:

String one = new String("word");
String two = new String("word");

System.out.println(one.equals(two));
System.out.println(one == two);
milil 24 Newbie Poster

You can write something like this:

<form method=post action="page.php" id='my_form'>
<input type="hidden" id="userName" name="userName" value="login_id" >
<input type="hidden" id="password" name="password" value="some_password" >
</form>
  <script>
    document.getElementById("my_form").submit()
  </script>

This will make form with some input fields and then call submit so it will redirect to another page. If you want to send some data with that form you can do it like this:

<input type="hidden" id="username" name="username" value="<?php echo $_POST['username']; ?>" >

so you will have text filed filled with value from your previous POST and then that value will be send to another page...