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
Which method cannot be overridden in java?
What is a char in java?
What happens if we override only equals?
How to avoid memory leak in java?
Is java a virus?
Objects or references which of them gets garbage collected?
Explain the hierarchy of java exception classes?
Enlist diffrent types of inheritance supported by java?
Can we synchronize static methods in java?
What is math exp in java?
What does mean in regex?
What is data type modifier?
Define jre i.e. Java runtime environment?
make a method which any number and any type of argument and print sum of that arguments.....
What is the association?