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
Explain jvm, jre, and jdk?
Is java owned by oracle?
Is 0 true or false?
What is a substring of a string?
What is an immutable class? How to create an immutable class?
List types of storage classes in java?
What value is a variable of the string type automatically initialized?
What is an abstract class and what is it’s purpose?
Explain what is Marker interface?
Explain restrictions on using enum?
Write a program to show whether a graph is a tree or not using adjacency matrix.
What is double checked locking in singleton?
Explain the difference between intermediate and terminal operations in java8?
What is the synonym of string?
Which arithmetic operations can result in the throwing of an arithmeticexception?