Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

//package com.java2s;

public class Main {
    public static String getRepeat(int[] results) {
        String repeatstr = null;
        int repeat = 0;
        for (int i = 0; i < results.length; i++) {
            if (results[i] == 0) {
                repeat &= (~(1 << i));
            } else {
                repeat |= (1 << i);
            }
        }
        repeatstr = String.valueOf(repeat);
        return repeatstr;

    }
}