Live Help (Start Chat)
View Count: 0
Duration: 5 mins
Accessed date:
Not Yet Viewed
View Count: 0
Duration: 57 mins
Accessed date:
Not Yet Viewed
Post your comment / feedback here
 
 

Be the first one to comment about this video

Question No: 1 of 10
1. When does Exceptions in Java arises in code sequence? 
Options:
  1. Run Time
  2. Compilation Time
  3. Can Occur Any Time
  4. None of the mentioned
View Answer/Explanation:
a
Explanation:

Question No: 2 of 10
2. Which of these keywords is not a part of exception handling? 
Options:
  1. try
  2. finally
  3. thrown
  4. catch
View Answer/Explanation:
c
Explanation:

Question No: 3 of 10
3. Which of these keywords must be used to monitor for exceptions? 
Options:
  1. try
  2. finally
  3. throw
  4. catch
View Answer/Explanation:
a
Explanation:

Question No: 4 of 10
4. Which of these keywords must be used to handle the exception thrown by try block in some rational manner? 
Options:
  1. try
  2. finally
  3. throw
  4. catch
View Answer/Explanation:
d
Explanation:

Question No: 5 of 10
5. Which of these keywords is used to manually throw an exception? 
Options:
  1. try
  2. b) finally
  3. throw
  4. catch
View Answer/Explanation:
c
Explanation:

Question No: 6 of 10
6. What is the output of this program?
class exception_handling 
{
public static void main(String args[]) 
{
try 
{
System.out.print("Hello" + " " + 1 / 0);
}
catch(ArithmeticException e) 
{
System.out.print("World");            
}
}
} 
Options:
  1. Hello
  2. World Answer: b
  3. HelloWorld
  4. Hello World
View Answer/Explanation:
b
Explanation:

Question No: 7 of 10
7. What is the output of this program?
class exception_handling 
{
public static void main(String args[]) 
{
try 
{
int a, b;
b = 0;
a = 5 / b;
System.out.print("A");
}
catch(ArithmeticException e) 
{
System.out.print("B");             
}
}
} 
Options:
  1. A
  2. B
  3. Compilation Error
  4. Runtime Error
View Answer/Explanation:
b
Explanation:

Question No: 8 of 10
8. What is the output of this program?
class exception_handling 
{
public static void main(String args[]) 
{
try 
{
int a, b;
b = 0;
a = 5 / b;
System.out.print("A");
}
catch(ArithmeticException e) 
{
System.out.print("B");            
}
finally 
{
System.out.print("C");
}
}
} 
Options:
  1. A
  2. B
  3. AC
  4. BC
View Answer/Explanation:
d
Explanation:

Question No: 9 of 10
9. What is the output of this program?
class exception_handling 
{
public static void main(String args[]) 
{
try 
{
int i, sum;
sum = 10;
for (i = -1; i < 3 ;++i)
sum = (sum / i);
}
catch(ArithmeticException e) 
{
System.out.print("0");            
} 
System.out.print(sum);
}
} 
Options:
  1. 0
  2. 05
  3. Compilation Error
  4. Runtime Error
View Answer/Explanation:
c
Explanation:

Question No: 10 of 10
10. What is the output of this program?
 class exception_handling 
{
public static void main(String args[]) 
{
try 
{
int i, sum;
sum = 10;
for (i = -1; i < 3 ;++i) 
{
sum = (sum / i);
System.out.print(i);
}
}
catch(ArithmeticException e) 
{         
System.out.print("0");
}
}
} 
Options:
  1. -1
  2. 0
  3. -10
  4. -101
View Answer/Explanation:
c
Explanation:

  1