Can the abstract class be final?
No, Combination of modifiers final and abstract is illegal in java.
What happens when you invoke a thread's interrupt method while it is sleeping or waiting?
When a task's interrupt() method is executed, the task enters the ready state. The next time the task enters the running state, an InterruptedException is thrown.
What is the difference in between C++ and Java. can u explain in detail?
Java:
There are no pointers.
There is no Operator Overloading.
There are no preprocessors.
There are no Structures and Unions.
There are no Enums.
There are no Functions (only methods within class).
There is no goto statement.(In java goto and const are reservedwords but Unused)
There are no Coercions(types should be converted explicitly)
There are no Global variables(variable is part of a class)
There are no Templates.(but in latest versions there are)
There are no default parameters.
There is garbage collection
There is multi-thread support.
C++:
There are pointers.
There is Operator Overloading
There are prepocessors.]
There are Structures and Unions.
There are Enums.
There are functions.
There is goto statement.
There are Coercions
There are Global variables
There are Templates.
There are default parameters.
There is no garbage collection.
There is support for multi-threading.
What value does readLine() return when it has reached the end of a file?
The readLine() method returns null when it has reached the end of a file.
Can a Byte object be cast to a double value?
No, an object cannot be cast to a primitive value