I have an arraylist with type patient_class and the arraylist type has been underlined in yellow and the IDE has mentioned "redundant type arguments in new expression (use diamond operator instead)".
My problem is: Should I use the diamond operator instead? Is it a must? Will I get any data loss or any other problem when storing records to the arraylist?
Here is my arraylist:
public class Register_newpatient extends javax.swing.JFrame {
public Register_newpatient() {
initComponents();
groupbutton();
}
public void groupbutton()
{
ButtonGroup bg1=new ButtonGroup();
bg1.add(rbopd);
bg1.add(rbinpatientcare);
bg1.add(rbboth);
}
all_error_handling checkerror = new all_error_handling();
JFrame frame = new JFrame();
static ArrayList<patient_class>patientlist = new ArrayList<patient_class>();
To be honest I have no idea what a diamond operator actually is.