Question: in Java: 4) Write a method createId declared as follows: public static String createID (String firstName, String lastName) {... It should return a string consisting

in Java:

 in Java: 4) Write a method createId declared as follows: public

4) Write a method createId declared as follows: public static String createID (String firstName, String lastName) {... It should return a string consisting of the first initial, followed by the last name, followed by a randomly generated number between 1 and 50 (all lower case). E.g. for input Steve Kautz the return value would look like "skautz42". The number should be generated with an instance of java.util.Random, using the nextInt() method. (Note that since this method is static and needs no instance variables, we don't have to worry here about what class it is defined in.)

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!