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

Is hashset ordered java?

1159


What technique is carried out to find out if a particular string is empty?

1062


What types of index data structures can you have in java?

1319


What is a memory leak in java?

1134


What is difference between array and arraylist in java?

1040


What is a package in java? List down various advantages of packages.

1347


What is the size of arraylist in java?

1071


What are the types of methods in java?

1182


What is the difference between class & object?

1064


Does hashset allow duplicates in java?

1184


How we can generate random numbers in java?

1174


Is java 1.7 the same as java 7?

1104


What's the base class of all exception classes?

1119


When do we use synchronized blocks and advantages of using synchronized blocks?

1280


What is the abstract class?

1091