Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVA

write a code to print second last word of input string

String string = "Hai,Hello,How,are,you";
String[] bits = string.split(",");
String lastWord = bits[bits.length - 2];
tvs.setText(lastWord);
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #write #code #print #word #input #string
ADD COMMENT
Topic
Name
7+3 =