Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public class NewJFrame extends javax.swing.JFrame {
- ArrayList<Integer> colours = new ArrayList<Integer>();
- BufferedReader br = null;
- /**
- * Creates new form NewJFrame
- */
- public NewJFrame() {
- int word=0;
- try {
- br = new BufferedReader(new FileReader("Booklist.txt"));
- while ((word == br.read())){
- colours.add(word);
- }
- } catch (IOException e) {
- e.printStackTrace();
- } finally {
- try {
- br.close();
- } catch (IOException ex) {
- ex.printStackTrace();
- }
- }
- initComponents();
- }
- static public Boolean linearSearch(ArrayList colours, String B) {
- for (int k = 0; k < A.length; k++) {
- if (A[k].equals(B)) {
- return true;
- }
- }
- return false;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement