Skip to content
Snippets Groups Projects
Select Git revision
  • e54d13d20f5160a6efad47a0c7f2ff79434565bb
  • master default protected
2 results

C-evenements.md

Blame
  • Forked from an inaccessible project.
    Exemple4.java 436 B
    package TP04.Exercice_1.Exemple4;    
        
    public class Exemple4 {    
        public int example4() {
            int data = 0; // Initialize the variable with a default value
            try {
                data = getData();
            } catch (NullPointerException e) {
                e.printStackTrace();
            }
            return data;
        }
    
        public int getData() throws NullPointerException {
                throw new NullPointerException();
        }
    }