-
JSP jspinit() method
Will you be able to override jspinit() methods? Justify
-
Need of Method Overloading
What is the need of method overloading? What would happen if this feature is not present in Java?
-
Object Class
When you declare a class, why does it automatically extends to object class? Give 2 reasons.
-
Runnable Method
If Thread class contains run() method then why we are using run() method by implementing the runnable method in the Thread?
-
Size of an Object
How to find size of an object?
-
-
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? -
-
Java code to set column width in CSV file
Can someone help on how to set the column width in CSV file using javacode.
I have used FileWriter class to upload data into the csv file. Results are getting populated properly but csv file showing results with default column width. Is there a way we can set the width of the column dynamically based on result length or set fixed length?
-
Explain Object Construction in simple terms
In Java, object types (i.e., classes) must be explicitly constructed for initialization. Explain object construction. Then, state the name of the mechanism for object destruction, and explain in simple terms how it works.
-
-
-
What is the List interface
The List interface provides support for ordered collections of objects.
-
How does Java handle integer overflows and underflows
It uses those low order bytes of the result that can fit into the size of the type allowed bythe operation.
-
What is the difference between the >> and >>> operators
The >> operator carries the sign bit when shifting right. The >>> zero-fills bits that havebeen shifted out.
-
What is the range of the char type
The range of the char type is 0 to 2^16 - 1.
-
What is the purpose of finalization
The purpose of finalization is to give an unreachable object the opportunity to performany cleanup processing before the object is garbage collected.
-
What invokes a thread's run() method
After a thread is started, via its start() method or that of the Thread class, the JVMinvokes the thread's run() method when the thread is initially executed.
-
-
Java Interview Questions
Ans