Need a unique gift idea?
A Pastebin account makes a great Christmas gift
SHARE
TWEET

Untitled

a guest Dec 6th, 2018 77 Never
Upgrade to PRO!
ENDING IN00days00hours00mins00secs
 
  1. public class Person {
  2.     private String personName;
  3.     private int personAge;
  4.     public Person (String name, int age) throws IllegalExceptionArgument {
  5.         try {
  6.             if (name == null || name.length() == 0 || age < 0 || age > 122) {
  7.                 throw new IllegalArgumentException();
  8.             }
  9.             personName = name;
  10.             personAge = age;
  11.         } catch (IllegalArgumentException e) {
  12.             throw e;
  13.         }
  14.     }
  15. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top