Java Interview Questions & Answers part 7

0
315
Q: – What are the two types of multitasking?

process-based
Thread-based

Q: – Can we have catch block with out try block?

No

Q: – When you declare a method as abstract, can other nonabstract methods access it?

Yes

Q: – What is the default thread at the time of starting the program?

main thread

Q: – What is the method available for setting the priority?

setPriority()

Q: – Can there be an abstract class with no abstract methods in it?

Yes

Q: – How do we change the values of the elements of the array?

The array subscript expression can be used to change the values of the elements of the array..

 Q: – What are all the methods available in the Runnable Interface?

run()

Q: – What is Constructor?

A constructor is a special method whose task is to initialize the object of its class.

Submitted By:-Ankur Jain           Email-ID: – ankurjain548@gmail.com

SHARE

LEAVE A REPLY