Question
Assuming a method contains code which may raise an Exception (but not a RuntimeException), what is the correct way for a method to indicate that it expects the caller to handle that exception:

1) throw Exception

2) throws Exception

3) new Exception

4) Don't need to specify anything




More Java Questions..
Can variables be used in Java without initialization?

What is the difference between java bean and enterprise java bean?

How does the java database connectivity (jdbc) work?

What are the advantages of threads in java?

What Is Java Api For Xml-based Rpc (jax-rpc)?

What is static synchronized method in JDBC API? Give an example?

Should we override finalize method

What is object cloning in Java?

What is difference between notify() and notfiyAll()

Describe java's security model.

Is there is any error if you have multiple main methods in the same class?

What is the name of the method used to schedule a thread for execution?

1) init();

2) start();

3) run();

4) resume();

5) sleep();

Can I import the same package/class twice? Will the JVM load the package twice at runtime?

What releases of Java technology are currently available? What do they contain?

What is asymmetric clustering in WebSphere?

What is pass by value and pass by reference?

What are the actions that can occur when a thread enters blocked state

How do I launch the browser using WebDriver

What is the use of Void(0)?

How does the native language C or C++ understand data types in JAVA



Search
Can you Answer!!
  • Q Why would applications require asynchronous communications?
  • Q Explain briefly the functions of treasury department?
  • Q How the process time is calculated in a wc when both labour, machine categories exist?
  • Q What is INTERNAL PAYROLL PROCESS?
  • Q Explain architecture of SSIS?
  • Q Which sinus opens into sphenoehmoidal recesses A. frontal sinuses B. maxillary sinuses C. anterior and middle groups of ethmoidal sinuses D. posterior group of ethmoidal sinuses E.sphenoidal sinuses
  • Q Suggest any topic suitable for case study in commerce.
  • Q What is a credit balance?
  • Q July 18 observed as?
  • Q Which all databases powercenter server on windows can connect to?
  • Q What do you mean by ‘insurance coverage’?