have i done this while loop correct
===

java isn't my stung point especially loops , while do-hile for, i would just like some help with this bit of code whether i've got it correct or if its wrong and what i've done wrong.

    		int total = 1, count = 10;
			while (count < 10)
				System.out.print(count + " ");
			//	total = total + count;
				
			{
				System.out.print(count + " ");
				total = total + count;
			}
			System.out.println(total);
			

	}

    }

I've commented out the first 'total = total + count;' because it doesn't seem to be necessary.   + when i have that and the first System both in the code it prints out 10, 21 instead of 10,11. i found only one needs to be in doesn't matter which one.
but if neither are in it only prints out the original total value 1. also if count is less than 10 it just gives me an infinite list of whatever value it is i.e infinite amount of 1's.


any help would be much appreciated, I'm gonna continue working on it but i would love you input
