Code example for StreamTokenizer

Methods: nextTokenslashStarComments

0
     * @tests java.io.StreamTokenizer#slashStarComments(boolean) 
     */ 
    public void test_slashStarComments_withSTClosed() throws IOException { 
        Reader reader = new CharArrayReader( "t /* t */ t".toCharArray());
 
        StreamTokenizer st = new StreamTokenizer(reader);
        st.slashStarComments(false);
 
        assertEquals(StreamTokenizer.TT_WORD,st.nextToken());
        assertEquals(StreamTokenizer.TT_EOF,st.nextToken());
    } 
     
	/** 
	 * @tests java.io.StreamTokenizer#toString() 
	 */ 
	public void test_toString() throws IOException { 
		setTest("ABC Hello World"); 
		st.nextToken();
		assertTrue("toString failed." + st.toString(),
			   st.toString().equals(