-
How do you create a Reader object from an InputStream object?
A) Use the static createReader( ) method of InputStream class.B) Use the static createReader( ) method of Reader class.C) Create an InputStreamReader object, passing the InputStream object as an argument to the InputStreamReader constructor.D) Create an OutputStreamReader object, passing the InputStream object as an argument to the OutputStreamReader constructor.
-
How is it possible for two String objects with identical values not to be equalunder the == operator
The == operator compares two objects to determine if they are the same object inmemory. It is possible for two String objects to have the same value, but locatedindifferent areas of memory.
-
-
instanceOf operator
what is difference between instanceOf operator and getclass()
-
Package Program
How to create a package program and what is the step to use a package program and how to run this type of programs?
-
-
Java valueOf( ) method
What is the use of valueOf( ) method?
-
Advantage of java
What is the main advantage of java when compared to other programing languages...?
-
Which arithmetic operations can result in the throwing of an ArithmeticException
Integer / and % can result in the throwing of an ArithmeticException.
-
Java object variable and class variable
What is the difference between object variable and class variable..?
-
What is the difference between a Scrollbar and a ScrollPane
A Scrollbar is a Component, but not a Container. A ScrollPane is a Container. AScrollPane handles its own events and performs its own scrolling.
-
How to find size of string in java
How to know that a string require how much bytes in memory......
Ex. String s="abc";
String s=new String("abc");
How much memory is used for s and s2 -
-
How many threads at a time can access a monitor?
A) oneB) twoC) noneD) three
-
-
MVC Advantages
What is MVC and what are its advantages?
-
Why compiler does not provide default constructor ?
Why compiler does not provide default constructor if there is any parametrized constructor is provided by programmer.?
-
-
System is a class or a package?
class Test
{
public static void main(String... a)
{
System.out.println("hello world");
}
}
In the above code if we write "s" of String class in lowercase, it gives an error of class not found, but if we write "S" of "System" class in lower case it gives an error package not found.
why? -
Use of Static
What is the use of static in (public static void main string args[])
Java Interview Questions
Ans