Computer Science, asked by singhtvisha52, 9 months ago

//Predict output
class string
{
public static void main()
{
String s="go goa gone";
String w="";
s=s+" ";
int l,i;
char ch;
l=s.length();
for(i=0;i<l;i++)
{
ch=s.charAt(i);
if(ch!=' ')
{
w=w+ch;
}
else
{
System.out.println(w);
w="";
}
}
}
}​

Answers

Answered by anindyaadhikari13
3

Answer:

The output will be - go goa gone

Explanation:

I hope this will help you..Please mark this answer as the brainliest.

Answered by MohakBiswas
2

Answer:

The output will be - go goa gone .

Explanation:

Mark it as brainliest and follow me ...

Similar questions