What is the output of following Java language code?

public class Main

{

public static void main(String[] args) {

int c = 1;

while (c<= 5) {

System.out.println(c % 5 ==1?"--" : "@@@@");

++c;

}

}}

1

--

@@@@

@@@@

@@@@

@@@@

2

--

@@@@

@@@@

--

--

3

@@@@

@@@@

@@@@

--

--

4

--

--

@@@@

Sponsored

hivanix.in

Visit

This quiz is brought to you by hivanix.in

🌐 Web App Development

Quick Navigation