Scenario: There are 1 to 100 numbers. Each number should be
keep in the each column like from A column to Z column ie 1
to 26. From 27 to 52 should be in 2nd row in the excel
sheet. This has to be continue till 100. How do you write
Java program and what are various methods.
Answer Posted / rupesh
package com.ab.Demo;
public class demo
{
public static void main(String[] args)
{
for (int i=1;i<=100;i++ )
{
if (i%26==0)
{
System.out.print(i+"\t");
System.out.println("");
}
else
{
System.out.print(i+"\t");
}
}
}
}
| Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers
How many threads does a core java have?
Explain about interthread communication and how it takes place in java?
Is null an object java?
What is meant by stack and queue?
What does int [] mean in java?
what do you mean by marker interface in java?
Is array passed by reference in java?
Is singleton thread safe in java?
What is a double vs float?
What is meant by 'Class access modifiers'?
What is the difference between and ?
What is the purpose of a volatile variable?
How the metacharacters are different from the ordinary characters?
Can a constructor be protected?
What is a text string?