Wednesday 27 February 2013

26. How can you replace the comment at the end of main() with code that will write the

26. How can you replace the comment at the end of main() with code that will write the
integers 0 through 9?


Answer:-
A is correct.
In order to write a primitive data type such as an int, you need to use a FilterInputStream subclass such as DataInputStream.
This class defines writeInt(), which is perfect for our needs.



No comments:

Post a Comment