How do I call a class in the print function?

view story

http://stackoverflow.com – I am a beginner in developing and I know the question may sounds very basic but, let me cut to the chase: here is my class public class MainActivity extends Activity { private ListView lvPhone; @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); lvPhone = (ListView)findViewById(R.id.listPhone); List<PhoneBook> listPhoneBook = new ArrayList<PhoneBook>(); listPhoneBook.add(new PhoneBook( BitmapFactory.decodeResource(getResources( (HowTos)