Tell me the programme for this
@
1 2
@ @ @
1 2 3 4
Answer Posted / sachin
package abc;
public class Sachin {
int n=4;
public static void main(String... args){
Sachin s=new Sachin();
for (int i=0;i<s.n;i++){
if(i%2==0){
for(int a=0; a<i+1;a++){
System.out.print("@");
}
}else{
for(int a=0; a<i+1;a++){
System.out.print(a+1);
}
}
System.out.println();
}
}
}
| Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers
What are the access modifiers in java?
What are void methods?
When we serialize an object does the serialization mechanism saves its references too?
when a request is generated from apache tomcat 5.5 and goes to oracle 10g or mysql,,, how the oracle or mysql reads the request as apache is a web server and oracle 10g is application server? when the oracle 10g provides response, how the apche tomcat reads it???
What is not object oriented programming?
What is the purpose of lambda expressions?
How do you sort arraylist in descending order?
What are generic methods?
Are variables stored in ram?
What do you understand by a Static Variable?
How do you find the independent variable?
Why java is considered as platform independent?
What is protected access modifier?
According to java operator precedence, which operator is considered to be with highest precedence?
Explain JMS in detail.