Answered step by step
Verified Expert Solution
Question
1 Approved Answer
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:
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
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started