Im currently on the topic of IO Streams to write and read data from/to file and console & I need help to remember the syntax.
while creating a StreamTokenizer object I created it as...
StreamTokenizer tokenizer = new StreamTokenizer(new BufferedReader(new InputStreamReader(System.in)));
while writing data to the file The syntax was
BufferedOutputStream fileOut = new BufferedOutputStream(Files.newOutputStream(file)
AND
BufferedWriter fileOut = Files.newBufferedWriter(file,Charset.forName("UTF-16"),CREATE,APPEND)
MY QUESTION IS.......
All these IO operations use streams but in the first case StreamTokenizer was created using ALL CONSTRUCTORS of the encapsulated classes
but in the other two
a constructor was used along with a Files static method.
ANY MNEMONIC TO REMEMBER THIS?????
while creating a StreamTokenizer object I created it as...
StreamTokenizer tokenizer = new StreamTokenizer(new BufferedReader(new InputStreamReader(System.in)));
while writing data to the file The syntax was
BufferedOutputStream fileOut = new BufferedOutputStream(Files.newOutputStream(file)
AND
BufferedWriter fileOut = Files.newBufferedWriter(file,Charset.forName("UTF-16"),CREATE,APPEND)
MY QUESTION IS.......
All these IO operations use streams but in the first case StreamTokenizer was created using ALL CONSTRUCTORS of the encapsulated classes
but in the other two
a constructor was used along with a Files static method.
ANY MNEMONIC TO REMEMBER THIS?????