I want to sort numbers without using Arrays. I have this:
 Scanner s = new Scanner(System.in);
    System.out.print("Input 3 numbers: ");
    int a = s.nextInt();
    int b = s.nextInt();
    int c = s.nextInt();
    System.out.print("Increscent: ");
    if (a >= b) { 
        int temp; 
        temp = a;
        a = b;
        b = temp;
    }
    if (c < a) 
    {
        System.out.println(c + " " + a + " " + b);
    } else if (c > b) 
    {
        System.out.println(a + " " + b + " " + c);
    } else 
    {
        System.out.println(a + " " + c + " " + b);
    }
But what should I do if I want to use more numbers? Is there some better code or I must use this way all the time?
ifstatements like you have, but it only works for fixed numbers of elements, and doesn't scale up well past three or four. You could also use a linked list, but arrays are vastly superior. Question: WHY do you not want to use an array?