Buggy code:
public class AddFastExpenseActivity extends Activity { private static String groupUuid ; private double cost ; private String description ; private String expenseDate ; private boolean back = false ; @ Override protected void onCreate ( Bundle savedInstanceState ) { } @ Override public boolean onCreateOptionsMenu ( Menu menu ) { } @ Override public boolean onOptionsItemSelected ( MenuItem item ) { } private void addExpenseToAnExistingGroup ( ) { } private void addExpenseToNewGroup ( ) { } public static class PlaceholderFragment extends Fragment { private EditText dateEditText ; private EditText costEditText ; private EditText descEditText ; private Calendar myCalendar ; private OnDateSetListener date ; public PlaceholderFragment ( ) { } @ Override public View onCreateView ( LayoutInflater inflater , ViewGroup container , Bundle savedInstanceState ) { final View rootView = inflater . inflate ( fragment_add_fast_expense , container , false ) ; AddFastExpenseActivity . groupUuid = null ; myCalendar = Calendar . getInstance ( ) ; dateEditText = ( ( EditText ) ( rootView . findViewById ( expense_date ) ) ) ; SimpleDateFormat format = new SimpleDateFormat ( "dd//MM//yyyy" ) ; AddFastExpenseActivity activity = ( ( AddFastExpenseActivity ) ( getActivity ( ) ) ) ; if ( activity . back ) { costEditText = ( ( EditText ) ( rootView . findViewById ( expense_cost ) ) ) ; descEditText = ( ( EditText ) ( rootView . findViewById ( expense_description ) ) ) ; double cost = activity . cost ; String description = activity . description ; String date = activity . expenseDate ; descEditText . setText ( description ) ; costEditText . setText ( String . valueOf ( cost ) ) ; dateEditText . setText ( date ) ; } else { dateEditText . setText ( format . format ( myCalendar . getTime ( ) ) ) ; } date = new DatePickerDialog . OnDateSetListener ( ) { @ Override public void onDateSet ( DatePicker view , int year , int monthOfYear , int dayOfMonth ) { myCalendar . set ( Calendar . YEAR , year ) ; myCalendar . set ( Calendar . MONTH , monthOfYear ) ; myCalendar . set ( Calendar . DAY_OF_MONTH , dayOfMonth ) ; updateLabel ( ) ; } private void updateLabel ( ) { <START_BUG> String myFormat = "dd//mm//yy" ; <END_BUG> SimpleDateFormat sdf = new SimpleDateFormat ( myFormat , Locale . US ) ; dateEditText . setText ( sdf . format ( myCalendar . getTime ( ) ) ) ; } } ; dateEditText . setOnClickListener ( new View . OnClickListener ( ) { @ Override public void onClick ( View v ) { new DatePickerDialog ( getActivity ( ) , date , myCalendar . get ( Calendar . YEAR ) , myCalendar . get ( Calendar . MONTH ) , myCalendar . get ( Calendar . DAY_OF_MONTH ) ) . show ( ) ; } } ) ; List < GroupDTO > groupDTOs = UserLocalDB . getGroupsDTOs ( ) ; List < String > groupsNames = new ArrayList < > ( ) ; for ( GroupDTO groupDTO : groupDTOs ) { groupsNames . add ( groupDTO . getGroupName ( ) ) ; } if ( groupDTOs . isEmpty ( ) ) { View chooseGroupCard = rootView . findViewById ( choose_group_card ) ; chooseGroupCard . setVisibility ( GONE ) ; } else { Spinner spinner = ( ( Spinner ) ( rootView . findViewById ( groups_spinner ) ) ) ; ArrayAdapter < String > spinnerArrayAdapter = new ArrayAdapter ( getActivity ( ) , layout . simple_spinner_item , groupsNames ) ; spinnerArrayAdapter . setDropDownViewResource ( simple_spinner_dropdown_item ) ; spinner . setAdapter ( spinnerArrayAdapter ) ; spinner . setOnItemSelectedListener ( new AdapterView . OnItemSelectedListener ( ) { public void onItemSelected ( AdapterView < ? > parent , View view , int position , long id ) { groupChosen ( UserLocalDB . getGroupsDTOs ( ) . get ( position ) . getGroupUuid ( ) ) ; } @ Override public void onNothingSelected ( AdapterView < ? > parent ) { } } ) ; } Spinner spinner = ( ( Spinner ) ( rootView . findViewById ( groups_spinner ) ) ) ; ArrayAdapter < String > spinnerArrayAdapter = new ArrayAdapter ( getActivity ( ) , R . layout . spinner_item , groupsNames ) ; spinnerArrayAdapter . setDropDownViewResource ( spinner_dropdown_item ) ; spinner . setAdapter ( spinnerArrayAdapter ) ; spinner . setOnItemSelectedListener ( new AdapterView . OnItemSelectedListener ( ) { public void onItemSelected ( AdapterView < ? > parent , View view , int position , long id ) { groupChosen ( UserLocalDB . getGroupsDTOs ( ) . get ( position ) . getGroupUuid ( ) ) ; } @ Override public void onNothingSelected ( AdapterView < ? > parent ) { } } ) ; Button addToNewGroupButton = ( ( Button ) ( rootView . findViewById ( create_new_group_button ) ) ) ; Typeface font = Typeface . create ( "sans-serif-condensed" , NORMAL ) ; addToNewGroupButton . setTypeface ( font ) ; addToNewGroupButton . setOnClickListener ( new View . OnClickListener ( ) { @ Override public void onClick ( View v ) { createNewGroup ( ) ; } } ) ; return rootView ; } private void createNewGroup ( ) { } private void groupChosen ( String groupUuid ) { } } }

Fix:
String myFormat = "dd//MM//yyyy" ;