All Downloads are FREE. Search and download functionalities are using the official Maven repository.

src.samples.java.ex.PL_Sample Maven / Gradle / Ivy

Go to download

An auxiliary findbugs.sourceforge.net plugin for java bug detectors that fall outside the narrow scope of detectors to be packaged with the product itself.

There is a newer version: 7.6.8
Show newest version
package ex;
import java.util.ArrayList;
import java.util.List;

@SuppressWarnings("all")
public class PL_Sample {
    List name = new ArrayList();
    List age = new ArrayList();

    String[] make = new String[100];
    String[] model = new String[100];

    int[] x = new int[10];
    int[] y = new int[10];

    public void printPeople() {
        for (int i = 0; i < name.size(); i++) {
            System.out.println(name.get(i) + " " + age.get(i));
        }
    }

    public String getModel(String cMake) {
        for (int i = 0; i < 100; i++) {
            String carMake = make[i];
            String carModel = model[i];

            if (cMake.equals(carMake))
                return carModel;
        }

        return null;
    }

    public void testFP() {
        int i = 0;
        int xx = x[i];
        i += 1;
        int yy = y[i];
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy