reset password
Author Message
304374842
Posts: 56
Posted 13:10 Sep 06, 2016 |

I am having a problem with Lab 2.  I am not sure if I am not understanding the arraylists correctly, but I am trying to return the arraylist from the first method and it doesn't seem to be working correctly.  Am I misunderstanding something about the assignment?

My method creates the arraylist that returns the reference to the arraylist of names.  My problem is accessing it in the main method.  I initialized it in main and then passed it to the method and then returned the reference but it doesn't seem to want to print.  Any suggestions?

jhurley
Posts: 207
Posted 13:18 Sep 06, 2016 |

try printing the list within the method after each time you add a name.  that will tell you whether the names are being added correctly at that point.

304374842
Posts: 56
Posted 14:22 Sep 06, 2016 |

Okay thanks.  Another question.  For the easy and hard problem you want the easy problem to test if the whole sentence matches what the user input and for the hard problem you want it to test if the two names match?

jhurley
Posts: 207
Posted 14:59 Sep 06, 2016 |

yes

avataricky
Posts: 19
Posted 20:18 Sep 06, 2016 |

So if the name is Joe then all you want them to type in is Joe?

jhurley
Posts: 207
Posted 07:24 Sep 07, 2016 |

yes