Hello guys im having problem with importing java.io.*;
When i do this i cannot resolved PrintStream
. I tried to import only PrintStream
and the problem was the same. I readed articles here and at other places about changing my libraries, cleaning project, refreshing it but the problem is still there? Can someone help me?
import java.io.*;
import java.util.ArrayList;
public class Group {
private String name;
private ArrayList<Student> students;
public Group(String name){
this.name = name;
this.students = ArrayList<Student>();
}
public String getName() {
return this.name;
}
public ArrayList<Student> getStudents() {
return this.students;
}
public void addStudent(Student student) {
students.add(student);
}
public void printStudents(PrintStream output) {
output.printf("Group name: %s%n", this.name);
output.printf("Students in group:%n");
for (Student student : this.students) {
output.printf(" Name: %s%n", student.getName());
}
}
}
And in the end i still cannot resolve PrintStream to a type