This course will be retired on July 14, 2025.

Well done!

You have completed Simple Refactoring!

Quiz Question 1 of 5

What’s wrong with the following code (even though it might never crash)?

public void onClick(View v) { 
  FactBook factBook = new FactBook();   
  String fact = factBook.getFact(); 
  factTextView.setText(fact); 
} 

Choose the correct answer below:

Skip Quiz Review Video