Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

//package com.java2s;
import android.os.Parcel;
import java.util.ArrayList;
import java.util.List;

public class Main {
    public static List<Integer> readIntegerListFromParcel(Parcel in) {
        boolean hasValue = (in.readByte() != 0);

        if (hasValue) {
            List<Integer> list = new ArrayList<>();
            int N = in.readInt();
            for (int i = 0; i < N; i++) {
                list.add(in.readInt());
            }
            return list;
        }

        return null;
    }
}