guys,, need help,, in java programing,, arrays



Share on Google+Share on Google+

sarah joy manimtim
guys,, need help,, in java programing,, arrays
3 Answer(s)      6 years and 8 months ago
Posted in : Java Beginners

create a program where you will input 10 numbers and arrange it in ascending way using arrays.

View Answers

February 17, 2011 at 2:22 PM

Java Input array elements and arrange them in ascending order

import java.util.*;
class ArraySort{
    public static void main(String[] args) {
        Scanner input=new Scanner(;
        System.out.println("Enter Array Elements: ");
        int array[]=new int[10];
        for(int i=0;i<array.length;i++){
        System.out.println("Sorted Array:");
        for(int i=0;i<array.length;i++){

February 20, 2011 at 10:03 AM

it didnt work,, it only copy the input numbers and does not in arrange it in ascending way...

May 20, 2011 at 1:44 PM

it did work... I modified the line:



System.out.print(array[i]) + " "); so it prints in one line... that way I can see the sorted array better


Related Tutorials/Questions & Answers:
guys,, need help,, in java programing,, arrays
guys,, need help,, in java programing,, arrays  create a program where you will input 10 numbers and arrange it in ascending way using arrays
Programing Help - Java Beginners
Programing Help  how to design a filebrowser in java "witout using Swing
Java programing help
Java programing help  Can you help me create this program? Write a console program that repeatedly prompts the user to enter data until they type done (any case, Upper, Lower, or Mixed). As they enter the data, assign
Hey Guys really need to learn - Java Beginners
Hey Guys really need to learn  Im a java beginner and i want to know... u will use scanf(%d%d%d, & month, day, year). How can i do this in java? Someone can help me.. Thank you so much.   Hi Friend, There are lot
arrays help - Java Beginners
arrays help  Write a program that sorts values. ? The program includes readIntegers() that o reads the user inputs o stores them in an array, and o returns the array   ? The program includes easySort() that o sorts
Java programing
Java programing   need help wrting this Write a program that has an array of 5 Strings, and determines which ones are palindromes (letter-case does not matter). thanks
Need Help in Java programming
Need Help in Java programming  Hello. Can someone please help me with writing the following program Java program that gives assignment details such as:assignment number,assignment name,due date,submission date,percentage marks
Need help on JAVA JSP
Need help on JAVA JSP  Hi, I have never worked on java and I have... using JAVA JSP). e.g. Tool does not adjust with the resolution of the screen(need to know how I can adjust it based on the cureen system's screen resolution
Need Help - Java Beginners
Need Help  Hello Sir, Am a beginner of Java. Also i did course... projects in Java as well as J2EE... Can u help me and guide to do a project.../reference/tutorials/ http
need help with a program - Java Beginners
Java algorithm - need help with a program  Java algorithm - need help with a program
need help - Java Beginners
need help  Need help in programming in Java  Simple java program that will show the output within quotes using system.out.println();DISPLAYING OUPUT " * " ," *** " ........I used System.out.print
Need help - Java Beginners
Need help   To Write a Java program that asks the users to enter a m * n matrix of integers, m and n being the number of rows and columns...; Hi Friend, Please try the following code. We hope that this code will help
Need help in java programming
Need help in java programming  Hello. Can someone please help me with writig the following programm. Assignment 20% Presentation 10% Mini Test 10% Exam 60% Java program that accepts the following details: student
need help with a program - Java Beginners
need help with a program   Part I An algorithm describes how... by the user. The output of the program should be the length and width (entered.... First you would need to make up the "test data". For this algorithm, the test data
Need *Help fixing this - Java Beginners
and maybe add retrieve function //need help with this one badly. Thanks guys for all the help. import java.text.*; import javax.swing.*; import java.awt.event....Need *Help fixing this  I need to make this program prompt user
Java Programming Need Help ASAP
Java Programming Need Help ASAP  You are required to develop..., maths mark, communications mark. You will then need accessor and mutator methods... class that creates an array of Students and handles it. You will need
PLZ Need some help JAVA...HELP !!
PLZ Need some help JAVA...HELP !!  Create a class names Purchase Each purchase contains an invoice number, amount of sale and amount of sales tax. Include set methods for the invoice number and sale amount. Within the set
help with substring in c programing
help with substring in c programing  Hi I could not found programming in C in the "select category" so I am posting my question in java section. Please help with substring function,prompt the user for two strings and display
need help on writing a program. - Java Beginners
Writing first Java Program  Hi, I need help to write my first Java... roseIndia to get your query solved. check given link to see the solution of your Java problem.
java arrays
java arrays  i need a java program to store student details like id,name,addr,marks,average,total..using arrays..input data using scanner class and by using class, object and constructor
Arrays in java
Arrays in java  what is param array in java
I need help in doing this. - Java Beginners
I need help in doing this.  Student DataBase i will need creating..., and the student's GPA.using arrays and objects, need to structure the information as follows:The basic data structures being used will be 2 parallel arrays
java programing
java programing  reverse a multidigit number using recursive definition
java programing
java programing  write a program to input a number or find & print the highest digit
java programing
java programing  write a program to input a number or find & print the highest digit. example:-2639 than print 9
Need help with this!
Need help with this!  Can anyone please help me... for later use. All the students info is put into arrays, but it is not writing to a file at all at this time. Any help would be greatly appreciated, thank you
java programing
java programing  Integers from 0 to X stored in an array of size X+1. Each integer appears once & only once, but in random order e.g. Consider array of size 5 as below... Arr[0]=3; Arr[1]=0; Arr[2]=1; Arr[3]=4; Arr[4]=2
Java Programing
Java Programing  I)WAP to print following series: 1) 1 2 3 2 3 4 5 4 3 4 5 6 7 6 5 4 2) (5!/x)+(10!/xx)+(15!/xx*x)+.....n terms. II)Write a menudriven program to perform the following as long as user
Sales System.. Need Help!! - Java Beginners
Sales System.. Need Help!!  were going to make a sales system in our... help us.. Thank you very much for your reply in my past questions you are a big help.. Thank you so much. Hope you will help me again thanks!! God Bless and more
Java Question Anyone need some HELP !!
Java Question Anyone need some HELP !!  Create a file that contains... of the two files. Note: For the above code, you need POI api. import... and poi-scratchpad-3.2-FINAL-20081019.jar files into the following path: \Java


Advertisement null