String pregunta1= texto1.getText(); String pregunta2= texto2.getText(); if(pregunta1.equals(pregunta2)){ //son iguales }else{ //son diferentes :) }