Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

//package com.java2s;

public class Main {
    public static void require(boolean requirement) {
        if (!requirement)
            throw new IllegalArgumentException();
    }

    public static void require(boolean requirement, String message) {
        if (!requirement) {
            throw (message != null) ? new IllegalArgumentException(message) : new IllegalArgumentException();
        }
    }
}