I'm newbe in Java and I've got some questions about using constructors.
In what situations I should use new Integer()
statement? Look at the code:
Integer a = 129;//1
Integer b = new Integer(129);//2
List<Integer> list= new ArrayList<Integer>();
list.add(new Integer(1));//3
list.add(2);//4
Which row is the example of bad programming practise?