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
Why is java not 100% pure oops?
How do you join strings in java?
How define set in java?
What is difference between null and void?
What is java and their uses?
Is there any way to skip finally block of exception even if some exception occurs in the exception block?
How can I right-justify a string?
What is run time allocation?
Can a constructor call another constructor?
Is array dynamic in java?
Can you override a final method?
What is treeset in java collection?
What is garbage collection? What is the process that is responsible for doing that in java?
What are some alternatives to inheritance?
What means public static?