I’m new to core Java so I’m trying to start off in the right direction.
I’m trying to determine if there is an accepted convention for using ‘type abbreviations‘ for variable naming.
For instance
pulic class ShirtExample {
// String variables
String foo = new String("String Variable");
//vs
String strFoo = new String("String Variable");
// Array variables
Shirt [] shirts = {
new Shirt(),
new Shirt(),
new Shirt()
};
//vs
Shirt [] arrShirts = {
new Shirt(),
new Shirt(),
new Shirt()
};
}
I would stay away from any conventions for naming variables, especially Hungarian notation or the like. The names should represent the intent of what you are storing.