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


Please Help Members By Posting Answers For Below Questions

Why does my function print none?

522


Why Java is not pure Object Oriented language?

647


What is the tradeoff between using an unordered array versus an ordered array?

664


List the three steps for creating an object for a class?

517


What is the difference between equals() and?

589






Is main a keyword in java?

540


Write a program to find the whether a number is an Armstrong number or not?

574


How is string immutable in java?

543


Program to Find the second largest element in an array.

591


Which class is the superclass of all classes?

602


What is autoboxing and unboxing?

584


How do you implement polymorphism in our day to day life?

2763


What is a pattern what is an anti pattern?

510


Why we use multi threading instead of multiprocessing?

576


What is difference between synchronize and concurrent collection in java?

522