Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*
- * To change this template, choose Tools | Templates
- * and open the template in the editor.
- */
- package calculatempo;
- import java.util.ArrayList;
- import java.util.Iterator;
- /**
- *
- * @author Gilson
- */
- public class Teste {
- private int i;
- private ArrayList arrayList = new ArrayList();
- private static final int TAM = 3000000;
- int array[] = new int[TAM];
- public Teste(){
- }
- public void fulfillArrayList(){
- for (i=0; i< TAM; i++){
- arrayList.add(i);
- }
- }
- public void fulfillArray() {
- for (i = 0; i < TAM; i++) {
- array[i] = i;
- }
- }
- public boolean searchArrayList(int info) {
- return arrayList.contains(info);
- }
- public boolean searchArray(int info){
- for (i = 0; i < TAM; i++){
- if (array[i] == info){
- return true;
- }
- }
- return false;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement