Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

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 / ashwin khandelwal

public class NumPlacing {

int k=0;
int n=4;
int val=0;
int[]a=new int[101];

public void done(){

for(int j=0;j<n;j++){

if(val<101){

for(int i=0;i<26;i++){

val=val+1;
int count=i+1;
a[val]=val;
k++;
System.out.println(count+"->"+a[val]+"\t");

}
System.out.println("\n");

}
}

}
public static void main(String args[]){
NumPlacing num=new NumPlacing();
num.done();
}

}

Is This Answer Correct ?    8 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is the role of the java.rmi.naming class?

1075


how to handle exceptions in ejb?

2313


How do you check if a string is lexicographically in java?

962


What does you mean in math?

1096


What type of variable is gender?

998


What are static methods?

1058


Write a program to find the greatest of three numbers in java?

1012


Write a function to find out longest palindrome in a given string?

1059


Can we define package statement after import statement in java?

1044


Why are lists ordered in java?

1020


Is null a keyword in java?

979


What is object in java?

994


What do you mean by ordered and sorted in collections in java?

1000


How does linkedhashmap work in java?

1028


What is binary search in java?

1004