Course Solutions Uncategorized (Solved) : Extract Last Name User Input User Input Full Name Use Split Method Split Method String Cla Q32195031 . . . .

(Solved) : Extract Last Name User Input User Input Full Name Use Split Method Split Method String Cla Q32195031 . . . .

 

Extract last name from user input.

Once a user input his/her full name, then use “split()” method.Split() is a method in String class. Find the split() in JAVA APIto get the syntax and how to use it. (20)

Input Index number of the string

We studied the String class and object already. Remember thatstring index number starts with 0. Once a user input starting andending index numbers for the lastname, use substring() to take outlast name. (20)

Compare two strings

One string (=last name) extracted using split() and theother(=last name) is extracted using substring().  Compare it whether it is the same or not. (20)

Exception handling (try,

OR

PayPal Gateway not configured

OR

PayPal Gateway not configured

Leave a Reply

Your email address will not be published. Required fields are marked *

Related Post