Who is this Chatbot?
Your DynamicArray class is mimicking an ArrayList which is exactly that: a dynamic array. Use this instead of reinventing the wheel.



Use break; instead of System.exit(0) to exit a loop. It leaves room to add more instructions beyond the loop without having to change the implementation. It's also a more natural way to break out of a loop.



getUser() and getAI() indicate a return type of User and AI respectively. Choose naming that indicates you are receiving their input.



Write your parameter names in full (user instead of u, name instead of n).



Adhere to the single responsibility principle. Printing output and receiving input are two distinct tasks and shouldn't be done in the same method.



Concerning OO principles: perhaps create an interface Conversationist that defines a method String getSentence(). Now your User can implement this as receiving console input while the AI implements it by taking a random value from its stored text. This makes sure you can just call getSentence() for both objects and introduces some inheritance structure.