Can we make use of "this" keyword reference inside a abstract method or abstract class? Explain
Latest Answer: No, We can't create instance for Abstract Class. ...
Which is faster at class loading - interface or abstract class? Why?
Latest Answer: Abstract class has both defined and undefined behaviour where as interface are used when any sub system of our application are frequently changed. ...
If Exception occurs in finalize() what happened to garbage collector? It will run or not? Explain
Latest Answer: finalize() method is called when an object is removed from the memory in order to perform any clean up code like closing a file or stream... ...
Explain the use of serialization process in real time projects?
Latest Answer: Serialization is writing the state of the object to a byte stream. This is useful when you want to save the state of the object in a persistent  storage such as file. ...
class A{ public static void main(String[] a){ System.out.print(String.valueOf(1)+String.valueOf(2)); String s1="s1"; String s2=s1.toString();
Latest Answer: The output is: 12,trueExplanation:The easy bit is that the first call to print() displays "12".The Javadoc for String.toString() says the return value is: "This object ...
When there is no methods in the marker interface, then what is the use of marker interface. What is the functionality of the interface. Why do we need to implement marker interface?
Latest Answer: If a class implements any interface than the object of that class is also interface type, i.e. object instanceof interface is true. And when an Object is required to be treated in some specific functionality say cloning or serialization the object is ...
What are all the methods used for Inter Thread communication and what is the class in which these methods are defined?
Latest Answer: Two or more threads are communication via wait(), notify() and notifyAll() method of an Object class.wait(): method will lock the monitor of the thread to not process.notify(): method will wake the thead which undergoes waiting state, the wait state is ...
In how many ways we can create an object? Explain with example.
Latest Answer: 1.Using New KeyWord2.Using ClassForName3.Clone ...
What is the meaning of supplying string[] args to main method?
Latest Answer: public static void main(String args[]) This array of Strings is the mechanism through which the runtime system passes information to your application. Each String in the array is called a command line argument. Command line arguments let users affect ...
An array A is of size N. Write a java method that jumbles all values in the array. All possible permutations must be possible and chances for each possible permutation must be equal. For example, size
Latest Answer: class JumbleArray{ public static void main(String args[]) { char charArr = {"A","B","C"}; ...
View page [1] 2 3 4 5 6 7 8 9 10 Next >>

Go Top