I don't necessarily want the exact coding to solve this...
What I would like is for somebody to please explain (in mono-syllable newb-speak, please) what the requirements are and what needs to happen to fix the problem.
I have been googling 'java exceptions' for a couple days now trying to figure out what needs to happen and so far I am more confused than when I started.
This is getting more and more frustrating because I was able to sail through the first few tasks with only a few setbacks that I was able to figure out and overcome.
Is there some key piece of knowledge that I failed to glean from the previous exercises?
right now I am receiving the following compile time error
Error in com/codegym/task/task09/task0914/Solution.java on line 52
<identifier> expected
package com.codegym.task.task09.task0914;
/*
Catching a group of exceptions
*/
public class Solution
{
public static void main(String[] args) throws Exception
{
//write your code here
try
{
method1 ( );
}
//write your code here
catch (Exception3 e)
{
}
catch (Exception2 e)
{
}
catch (Exception1 e)
{
}
}
public static void method1() throws Exception1, Exception2, Exception3
{
int i = (int) (Math.random() * 3);
if (i == 0)
throw new Exception1();
if (i == 1)
throw new Exception2();
if (i == 2)
throw new Exception3();
}
}
class Exception1 extends Exception
{
System.out.println(Exception1 e);
}
class Exception2 extends Exception1
{
System.out.println(Exception2 e);
}
class Exception3 extends Exception2
{
System.out.println(Exception3 e);
}