The coil-globule transition has been studied for A-B copolymer chains both by means of lattice Monte Carlo simulations using bond fluctuation algorithm and by a numerical self-consistent field method. Copolymer chains of fixed length with A and B monomeric units with regular, random and specially designed (protein-like) primary sequences have been investigated. The dependence of the transition temperature on the AB sequence has been analyzed. A protein-like copolymer is more stable than a copolymer with statistically random sequence. The transition is more sharpe for random copolymers. It is found that there exist a temperature below which the chain appears to be in the lowest energy state (ground state). Both for random and protein-like sequences and for regular copolymers with a relatively long repeating block, a molten globule regime is found between the ground state temperature and the transition temperature. For regular block copolymers the transition temperature increases with block size. Qualitatively, the results from both methods are in agreement. Differences between the methods result from approximations in the SCF theory and equilibration problems in MC simulations. The two methods are thus complementary.