I want to know the number of letters in the word and know if it is odd or the even
public static void main(String[] args) { String res ="welcom to the new world you may love it or hate it but you have to adapt to it anyway" + "you will remain in this world for afew monthes or years so you have to work and take adavantage" + "of it so as not to waste this time and get used to the idea of balance between the surrounding" + " environment and professional life. "; String [] str=res.split(" "); int r =res.length(); for(String s :str) if(r%2==0){ System.out.println(s+"even"); } else System.out.println(s+" "+"odd"); } }