All pastes #933831 Raw Edit

Mine

public java v1 · immutable
·published 2008-03-08 14:16 UTC
rendered paste body
import java.io.*;import java.util.*;public class hello {        public static void main(String argv[]) throws IOException {        Scanner filecfg = new Scanner(new FileReader ("/home/radium/Download/Java/code/aaa.conf"));        String text="null";        String name="null";        String number="0";        String path1="null";        String path2="null";        String path3="null";        String variable="null";        String value="null";        while (filecfg.hasNext()) {                text = filecfg.nextLine();                String[] word = text.split("=");                variable = word[0];                value = word[1];                switch (variable) {                case name    : name = value; break;                case number  : number = value; break;                default      : System.out.println("null"); break;                }        }        System.out.println(name);        System.out.println(number);        System.out.println(path1);        System.out.println(path2);        System.out.println(path3);        }}radium@vaio:~/Download/Java/code> javac hello.javahello.java:27: incompatible typesfound   : java.lang.Stringrequired: int                switch (variable) {                        ^1 error