Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Calling a String from an Array Okay I'm not sure how I can call the length of the string inside the arrays. For instance I

image text in transcribed

image text in transcribed

Calling a String from an Array

Okay I'm not sure how I can call the length of the string inside the arrays. For instance I want the output to read like this:

image text in transcribed

The UML says there is a getLength method in the Cake class but for some reason I can't call it by using Cake.getLength() (I was not given access to the source file)

image text in transcribed

public class Testcake public static void main (String] args) { Cake[] myCake = new Cake[4]; nyCake[0] = new Cake ( "Hello my friend." ); myCake [1] = new Cake ( "How are you? " ); myCake[2] = new Cake ( ); myCake[3] = new Cake ( "Have a great one!" ); for ( int x = 0; x

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

Fundamentals Of Database Management Systems

Authors: Mark L. Gillenson

2nd Edition

0470624701, 978-0470624708

More Books

Students also viewed these Databases questions

Question

What is the use of bootstrap program?

Answered: 1 week ago

Question

What is a process and process table?

Answered: 1 week ago

Question

What is Industrial Economics and Theory of Firm?

Answered: 1 week ago