Multiple choice

What will be the output of following program code? importjava.util.StringTokenizer; publicclassTokendemo { publicstaticvoid main(String[] args) {
StringTokenizerst=newStringTokenizer(Hi how are you?); while(st.hasMoreTokens()) {
System.out.println(st.nextToken()); } } }

  1. Hi how are you?

  2. Hihow are you ?

  3. Hihowareyou?

  4. Hihow are you?

  5. None of the above

Reveal answer Fill a bubble to check yourself
B Correct answer
Explanation

Option 2 is correct answer using StringTkenizer class and println() method.