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 a boolean field?
Why java is considered as platform independent?
What is variable argument in java?
Can vector have duplicates in java?
What is a instance variable in java?
What is bubble sort in java?
What language is an assembler written in?
What are nested classes in java?
What is bool mean?
How does multithreading take place on a computer with a single cpu?
Explain different types of wrapper classes in java?
Which graphs are functions?
What are the different data types in java?
Where will it be used?
What is java util concurrentmodificationexception?