Changes

Jump to navigation Jump to search
306 bytes added ,  13:51, 27 April 2022
m
Line 3: Line 3:  
===With apt===
 
===With apt===
 
  <nowiki>sudo apt-add-repository ppa:webupd8team/java
 
  <nowiki>sudo apt-add-repository ppa:webupd8team/java
                                      sudo apt-get update
+
                                      sudo apt-get update
                                      sudo apt-get install oracle-java8-installer</nowiki>
+
                                      sudo apt-get install oracle-java8-installer</nowiki>
    
Also ensure your JAVA_HOME variable has been set to:
 
Also ensure your JAVA_HOME variable has been set to:
Line 915: Line 915:  
         FileReader fr = new FileReader(file);
 
         FileReader fr = new FileReader(file);
 
         throw new Exception("Example exception throwing");
 
         throw new Exception("Example exception throwing");
 +
    }
 +
}
 +
 +
// Custom exception
 +
class CustomException extends Exception {
 +
}
 +
 +
class CustomException1 extends Exception {
 +
    public CustomException1()
 +
}
 +
 +
public class CustomExceptionRunner {
 +
    public void static main(String[], args) throws CustomException {
 +
        throw new CustomException("Some text");
 
     }
 
     }
 
}</source>
 
}</source>

Navigation menu