We describe in this paper a neural network method for the detection of compositional constraints in introns and exons. The first part of the algorithm (learning phase) consisted in presenting examples of intron and exon sequences to the network and in modifying its connections using the backpropagation algorithm. Previous connectionist methods achieved the learning of exons and introns using the latter as negative examples to the former. However, we chose to learn introns and exons jointly, using junk DNA as a common counter-example. In a second part (generalization phase), we rested the neural networks in the search for exons and introns in the human globin cluster. Their performances were also checked on the classification of unknown examples. As with the previous approaches, this technique discriminates introns and exons: values of the correlation coefficients are respectively 0.50 and 0.64 for the best achieved network. Moreover, using junk DNA sequences in the learning phase allows one to detect constrained regions inside the intron and the exon sequences (i.e. sequences that differ, by their nucleic acid compositions, from junk DNA). The application of our approach could be useful in the study of the internal organization of these sequences.