Java Interview Questions
1 .
What are difference between break and continue?
The break keyword halts the execution of the current loop and forces control out of the loop. 
Continue is similar to break, except that instead of halting the execution of the loop, it starts the next iteration.
2 .
What is the difference between System.out and System.err?
System.out and System.err both represent the monitor by default and hence can be used to send data or results to the monitor. But System.out is used to display normal messages and results whereas System.err is used to display error messages.
3 .
What is a Stream?
A stream is required to accept input from the keyboard. A stream represents flow of data from one place to another place.
4 .
In how many ways can you read data from keyboard?
In java there are 2 ways to read data from keyboard.
1. BufferedReader class.
2.Scanner class.
5 .
which class breaks the input into tokens using a delimiter which is whitespace by default, It provides many methods to read and parse various primitive values?
Scanner class is used to break the input into tokens, which by defaultly takes space as a delimiter.
6 .
what are the methods in BufferedReader class?
BufferedReader class have two methods.
1. read() and 
2. readLine() methods.
7 .
What is the use of Scanner class, When was it introduced in Java?
Scanner class introduced in Java 1.5 for reading Data Stream from the input device. 
8 .
what is the Scanner class method to read a character from the keyboard?
To read character value from the keyboard by using sc.next.charAt(0) method.
9 .
what is the BufferedReader class method to read a character from the keyboard?
To read character value from the keyboard by using br.read() or br.readLine().charAt(0) method.
10 .
On which memory, arrays are created in java?
Arrays created on dynamic memory by JVM. There is no question of static memory in Java: everything (variable, array, object etc.) is created on dynamic memory only.