Tell me the programme for this
@
1 2
@ @ @
1 2 3 4
Answer Posted / varun
public class HelloWorld{
public static void main(String []args){
int k=1;
for(int i=0;i<4;i++)
{
for(int j=0;j<=i;j++)
{
if(i%2==0)
System.out.print("@");
else
System.out.print(++k);
}
System.out.println();
k=0;
}
}
}
| Is This Answer Correct ? | 2 Yes | 0 No |
Post New Answer View All Answers
What is the difference between jvm and jre? What is an interface?
What is stringreader?
What is the purpose of the main method?
Can a class have more than one object?
Explain the difference between map and flatmap stream operation?
Which variables are stored in stack?
What is an escape character in java?
How do you compare characters in java?
What is a wrapper method?
Can list be null in java?
Can a main method be overloaded?
What is meant by object oriented programming – oop?
What is mean by exception?
What is java oops?
What are methods of a class?