Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

This is Java Problem So in python for example I have a number of int 5 and a string T. and it will print :

This is Java Problem

So in python for example I have a number of int 5 and a string "T". and it will print : TTTTT

in Python it symply do number * string and got that result

However. How do i do in Java?

I use this method but it wold not work

int number = 5

String Tell = "T"

String Result = Tell. repeat (number)

it's comes out error

Error: cannot find symbol symbol: method repeat(int) location: variable stars of type java.lang.String

Is there any other way to get this same result?

I cant give you the whole code because it is my work and if i post it here somebody else can use it. But my problem is only like that above Thanks

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

Step: 3

blur-text-image

Ace Your Homework with AI

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

Get Started

Students also viewed these Databases questions

Question

3. Describe the communicative power of group affiliations

Answered: 1 week ago