Welcome to the Java Programming Forums


The professional, friendly Java community. 21,500 members and growing!


The Java Programming Forums are a community of Java programmers from all around the World. Our members have a wide range of skills and they all have one thing in common: A passion to learn and code Java. We invite beginner Java programmers right through to Java professionals to post here and share your knowledge. Become a part of the community, help others, expand your knowledge of Java and enjoy talking with like minded people. Registration is quick and best of all free. We look forward to meeting you.


>> REGISTER NOW TO START POSTING


Members have full access to the forums. Advertisements are removed for registered users.

Results 1 to 2 of 2

Thread: How to see if a last letter of an element in ArrayList matches user input.

  1. #1
    Junior Member
    Join Date
    Nov 2019
    Location
    Essex
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Post How to see if a last letter of an element in ArrayList matches user input.

    Hi guys,

    Sorry if this is in the wrong place, I'm new here.

    I'm currently working on an assignment and I have one part I'm stuck on, we have to allow the user to enter a letter, then check an ArrayList to see if any of the elements end with that letter, any suggestions? I've tried a few different things but I can't get anything to work.

    Thanks!

  2. #2
    Super Moderator Norm's Avatar
    Join Date
    May 2010
    Location
    Eastern Florida
    Posts
    25,042
    Thanks
    63
    Thanked 2,708 Times in 2,658 Posts

    Default Re: How to see if a last letter of an element in ArrayList matches user input.

    Please post the code showing what you have tried.

    Be sure to wrap your code with code tags:

    [code]
    **YOUR CODE GOES HERE**
    [/code]

    to get highlighting and preserve formatting.
    If you don't understand my answer, don't ignore it, ask a question.

Similar Threads

  1. Replies: 9
    Last Post: August 23rd, 2013, 10:52 AM
  2. [SOLVED] Hangman Program Java: Comparing the User's Guess with Another String Letter by Letter
    By theonlydvr in forum What's Wrong With My Code?
    Replies: 4
    Last Post: June 29th, 2013, 05:35 PM
  3. user input going to wrong ArrayList
    By havinFun in forum What's Wrong With My Code?
    Replies: 1
    Last Post: April 15th, 2012, 02:58 PM
  4. [SOLVED] Returning ArrayList via user input
    By IanSawyer in forum Collections and Generics
    Replies: 4
    Last Post: March 27th, 2012, 05:40 PM
  5. Switching letter-cases from user input; why is not working?
    By Kimiko Sakaki in forum What's Wrong With My Code?
    Replies: 2
    Last Post: March 27th, 2011, 07:48 AM

Tags for this Thread