Answered step by step
Verified Expert Solution
Link Copied!

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:

image text in transcribed

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

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Upgrading Oracle Databases Oracle Database New Features

Authors: Charles Kim, Gary Gordhamer, Sean Scott

1st Edition

B0BL12WFP6, 979-8359657501

More Books

Students also viewed these Databases questions

Question

What are the delta and gamma of an option? AppendixLO1

Answered: 1 week ago