I think what you want to do is make the ArrayList a field in your class.
Code:
package VeryLong;
import java.util.*;
public class VeryLong{
private ArrayList<Integer> longInt;
public VeryLong(ArrayList<Integer> a){
this.longInt = a;
System.out.println("number is created");
};
public ArrayList<Integer> Readln(){
int i=0, tempint=0;
Scanner in = new Scanner(System.in);
String str;
str=in.next();
while (Character.isDigit(str.charAt(i)))
{
tempint = Integer.parseInt( Character.toString( str.charAt(i) ) );
this.longInt.add(tempint);
i++;
};
return this.longInt;
}
}
this way the array just lives in the class. It is private so other classes cannot call ArrayList methods on it directly. If you need use of any of the ArrayLists just set up a public method in your class that calls them.