Here you can find the source of join(List
public static int join(List<Integer> recycled)
//package com.java2s; //License from project: Apache License import java.util.*; public class Main { public static int join(List<Integer> recycled) { int ret = 0; for (int i = 0; i < recycled.size(); i++) { ret += Math.pow(10, i) * recycled.get(recycled.size() - i - 1); }// w ww . java 2 s . c o m return ret; } }