home / developersection / category
For solve the problem are possible only by the static Initialization block.
if you have to read and write the textual information Then Java has suggested not to use the FileInputStream and FileOutputStream classes .
If we want to read data from multiple stream in java input/output operation then SequenceInputStream class is very useful for that.
If we don’t know how many arguments we will have to pass in the method .Varargs is the better approach.
In Java, Their are several ways to taken an input from the keyboard.such like InputStreamReader Class,Scanner class,Console class etc.
Exception handling in java???before describing technical definition, first of all elaborate what is exception?Exception stands an event that disrupts
Serialization is a process of converting an object into a stream.
The Java Console class is often using to get input from console. It provides methods to read text and password.
The StreamTokenizer class allows you to break an input stream into tokens such as words.
There are two principal means of generating random (really pseudo-random) numbers: one is using the Random class and the other is using the Math.random method.
Getter and setter methods are used in Java to retrieve and manipulate private variables in a different class.
The whole idea behind encapsulation is to hide the implementation details from users. If a data member is private it means it can only be accessed within the same class. No outside class can access private data member (variable) of other class.