# data[].attributes.attachment_link.readable_text
package intro.ProgLang;

import java.io.File;
import java.io.PrintWriter;
import java.util.Scanner;

public class ReadProgLang {
    public static void main(String[] args) {
        File languages = new File("D:\\0java\\java\\untitled\\src\\intro\\ProgLang");

        Scanner scanner = new Scanner(languages);
        while (scanner.hasNext()) {
            System.out.println(scanner.next());
        }
        scanner.close();
    }
}

# data[].attributes.attachment_link.readable_text
package ProgLang;

public class ProgLang {
    private int year;
    private String name;
    public ProgLang(int year,String name){
        this.year = year;
        this.name = name;
    }

    public String getName() {
        return name;
    }

    public int getYear() {
        return year;
    }

    @Override
    public String toString() {
        return super.toString();
    }
}

# data[].attributes.attachment_link.readable_text
package ProgLang;

import java.io.File;
import java.io.IOException;
import java.util.Scanner;

public class test {
    public static void main(String[] args) throws IOException {
        try{
            File ProgLang = new File("D:\\java\\LinkNode\\src\\ProgLang\\ProgrammingLanguages");
            Scanner file = new Scanner(ProgLang);
            int count = 0;
            while(file.hasNext()){
                if(file.nextInt() >2008){
                System.out.println(file.next());
                count++;
                }else{
                    file.next();
                }
            }
            System.out.println("number of languages = "+count);
        }catch (IOException e){
            System.out.println(e.getMessage());
        }
    }
}

# data[].attributes.attachment_link.readable_text
package intro.ProgLang;

public class ProgrammingLanguages {
    private int year;
    private String name;

    public ProgrammingLanguages(int year, String name){
        this.year = year;
        this.name = name;
    }

    public String getName() {
        return name;
    }

    public int getYear() {
        return year;
    }

}

# data[].attributes.attachment_link.readable_text
package intro.ProgLang;

public class ProgLangTester {
    ProgrammingLanguages languages1 = new ProgrammingLanguages(2000,"java");
    ProgrammingLanguages languages2 = new ProgrammingLanguages(2005,"C");
    ProgrammingLanguages languages3 = new ProgrammingLanguages(2009,"C++");
}
