Given the following sample code:
class Example3{
void Twin(int a, float b) {
System.out.println("Hello ");}
}
class SubExample3 extends Example3{
public void Twin(int a, float b)throws java.io.IOException
{
System.out.println("Hello "); }
}
Choose the output of the above code :
1. Will run but gives no output
2. Compile error
3. Print 'Hello'
4. Ptint 'Hello' 'Hello'
(2)
"IOException" is not compatible with "throws" clause .
If you are facing any programming issue, such as compilation errors or not able to find the code you are looking for.
Ask your questions, our development team will try to give answers to your questions.