Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

//package com.java2s;

public class Main {
    public static boolean contains(Object[] arr, Object obj) {
        for (int i = 0; i < arr.length; i++) {
            Object object = arr[i];
            if (object.equals(obj)) {
                return true;
            }
        }
        return false;
    }

    public static boolean contains(long[] arr, long l) {
        for (int i = 0; i < arr.length; i++) {
            long lTemp = arr[i];
            if (lTemp == l) {
                return true;
            }
        }
        return false;
    }
}