Write a function that displays the passed string (word) three times in the same line. Words must be separated by a space and don’t have to merge into one. I'm confused, what should be the output? My output is: window file window file window file... but it does'nt work!!

asked 04 Mar '15, 18:01

Zain%20Mehar's gravatar image

Zain Mehar
13
accept rate: 0%


Please, write your code here.

link

answered 05 Mar '15, 07:16

RabenokDmitry's gravatar image

RabenokDmitry
1263
accept rate: 14%

\function: void displayString(String s) { System.out.print(s+" "); System.out.print(s+" "); System.out.print(s); }

link

answered 05 Mar '15, 17:07

AristocratSudip's gravatar image

AristocratSudip
162
accept rate: 4%

edited 13 Mar '15, 06:50

Elleonora%20Carry's gravatar image

Elleonora Carry ♦♦
275

Please don't post your solution. Give people clues to allow them to learn java

(05 Mar '15, 18:56) Elleonora Carry ♦♦

I think you have to pass a single word so try it with only single word like window

link

answered 06 Mar '15, 13:08

Reem's gravatar image

Reem
39118
accept rate: 0%

What want this proggram?

window window window file file file or window file window file window file ???????????

link

answered 03 Jan, 09:45

Alhunah's gravatar image

Alhunah
11
accept rate: 0%

Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "Title")
  • image?![alt text](/path/img.jpg "Title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Tags:

×16

Asked: 04 Mar '15, 18:01

Seen: 1,478 times

Last updated: 03 Jan, 09:45