High-Low Guessing Game
Since the end condition of the loop is always true, you can just omit it:

    for (int i = 1; ; i++)


The condition in the final else if(guess == number) is always true,
so you can use simply else.

There's no need to separate the declaration and initialization of the guess variable,
you can do int guess = input.nextInt() which is shorter.

The convention in Java is to put opening braces on the same line as the statement,
like this:

    for (int i = 1; ; i++) {
        int guess = input.nextInt();
        if (guess &lt; number) {
            System.out.println("Du gissade för lågt");
        } else if(guess &gt; number) {
            System.out.println("Du gissade för högt");
        } else {
            System.out.println("Antal gissningar: " + i);
            System.out.println("Grattis du gissade rätt!");
            break;
        }
    }