-
Multiple Inheritance
Why multiple inheritance is not applied in Java?
-
Argument Constructor
What is "no argument constructor " in Java?
-
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.
Why do threads block on I/O
Threads block on i/o (that is enters the waiting state) so that other threads may executewhile the i/o Operation is performed.
What is an Iterator interface
The Iterator interface is used to step through the elements of a Collection.
What is the difference between yielding and sleeping
When a task invokes its yield() method, it returns to the ready state. When a task invokesits sleep() method, it returns to the waiting state.
What is a native method
A native method is a method that is implemented in a language other than Java.
What is the difference between the Boolean & operator and the && operator
If an expression involving the Boolean & operator is evaluated, both operands areevaluated. Then the & operator is applied to the operand. When an expression involvingthe && operator is evaluated, the first operand is evaluated. If the first operand returns avalue of true then the second operand is evaluated. The && operator is then applied tothe first and second operands. If the first operand evaluates...
What is the purpose of the Runtime class
The purpose of the Runtime class is to provide access to the Java runtime system.
Ans