Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public class Main {
- public int param;
- public static void main(String[] args) {
- try {
- Main a = Main.class.getConstructor().newInstance();
- System.out.println("finished, param = " + a.param);
- } catch (Exception ex) {
- System.out.println("exception thrown");
- }
- }
- public Main() {
- this(-1);
- System.out.println("constr default");
- }
- public Main(int param) {
- System.out.println("constr param = " + param);
- this.param = param;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement