I can get to work this program in hundred of ways by rewritng this code.
But I wonder why it doesn't save to memory inside variables.
Compiler forbide to create static variable inside class.
Ok, I have solved this problem.
I made a mistake - I define class inside of while(), but I need to create it before while, then everything works fine.
Thank you so much, Helios, classes are solved this problem.