public class perform{
public static void Main(String args[]) throws IOException
{
perform obj = new perform();
obj.run();
}
public void run() throws IOException
{
String inputfile= "c:/file_adress";
List<String> field = null;
String delimeter = ";";
String line="";
BufferedReader br = new BufferedReader(new FileReader(inputfile));
while((line=br.readLine())!=null)
{
field = new ArrayList<String>();
field=Arrays.asList(line.split(delimeter));
for (String object : field) {
System.out.println( "-->" + object + "\n");
}
}
}
}
now when i try to put getter and setter on this code, by right clickin on the code and then going to source menu. it gives error - "The Operation is not applicable to the current selection. Select a field which is not declared as type variable or a type that declares such fields."
can anyone help me what changes i need to make to add getter and setter and why they are used.