English Deutsch Français Italiano Español Português 繁體中文 Bahasa Indonesia Tiếng Việt ภาษาไทย
All categories

this is a question for all the programming savvy out there....
hey you, try to answer this one......
it could be helpful to everyone viewing this site.....
here it goes.....

What does the following program print?
public class Mystery2 {
public static void main( String args[] )
{
int count = 1;
while ( count <= 10 ) {
System.out.println( count % 2 == 1 ?
"****" : "++++++++" );
++count;
}
}
}

well.......you may answer it now......

good luck to all.....

have a nice day....

jason......

2007-03-18 16:43:13 · 3 answers · asked by nosaj_amazin 1 in Computers & Internet Programming & Design

3 answers

++++++++
****
++++++++
****
++++++++
****
++++++++
****
++++++++
****

Such a mystery! What a well-named class.

2007-03-18 16:46:38 · answer #1 · answered by Rex M 6 · 0 0

There's no other answer but this: =p

****
++++++++
****
++++++++
****
++++++++
****
++++++++
****
++++++++

2007-03-18 21:04:19 · answer #2 · answered by Liviawarty J 2 · 0 0

?????...I don't even know what you wrote....

2007-03-18 17:10:29 · answer #3 · answered by Anonymous · 0 1

fedest.com, questions and answers