How to determine an oxidation number of an atom in the compound, that has at least two elements, which are not hydrogen or oxygen? Wiki says:


  [Oxidation state] is defined as the charge an atom might be imagined to have when electrons are counted according to an agreed-upon set of rules:
  
  The oxidation state of a free element (uncombined element) is zero
    for a simple (monoatomic) ion, the oxidation state is equal to the net charge on the ion.
  
  Hydrogen has an oxidation state of 1 and oxygen has an oxidation state of −2 when they are present in most compounds. (Exceptions to this are that hydrogen has an oxidation state of −1 in hydrides of active metals, e.g. LiH, and oxygen has an oxidation state of −1 in peroxides, e.g. H2O2
          the algebraic sum of oxidation states of all atoms in a neutral molecule must be zero, while in ions the algebraic sum of the oxidation states of the constituent atoms must be equal to the charge on the ion.


The same is written in my textbook. But how am I supposed to find the ox. number of an atom, which is in compound like $\ce{K2UO4}$?
In this case, the potassium ions are +1 each, and the oxygens are -2 as normal.  That leaves uranium in a highly oxidized +6 state.  The piece of information I think is missing is that Group 1 ions are almost always in the +1 state, because they so readily lose their outer valence electron.  A molecule that is not an ion, like your example, must have an overall charge of zero.