Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

//package com.java2s;
//License from project: Apache License 

import java.util.*;

public class Main {
    public static String iteratorToString(Iterator<? extends Object> iter) {
        if (iter != null) {
            StringBuilder sb = new StringBuilder();
            for (; iter.hasNext();) {
                sb.append(iter.next().toString());
            }
            return sb.toString();
        } else {
            return "";
        }
    }
}