Get all updates of Java4s
Follow Us: Email Newsletter

How to Sort Arrays in Java, Arrays Sorting In Java

Core Java » On Oct 23, 2012 { 2 Comments } By Sivateja

Hi let us see how to sort array of values in java, we can sort the arrays using Arrays class in java.util.*; package. Consider the following example..

SortArray.java

Output

Countries : Australia
Countries : India
Countries : Lundon
Countries : Malaysia
Countries : United States

You Might Also Like

  ♦ About Author ♦

Java4s_Author
sivateja@java4s.com
Full Stack( Java/J2EE & UI/UX ) Developer and founder of Java4s - Get It Yourself, A popular Java/J2EE Programming Blog. Sign-up for the Email Newsletter for your daily dose of Java tutorials.

Comments

2 Responses to “How to Sort Arrays in Java, Arrays Sorting In Java”
  1. babu says:

    very helpful

    I need some more question and ans:
    example
    1)in collection interface
    we write the code allow the duplicate values into set(interface)

  2. nitish jaiswal says:

    how to merge two Array?

Name*
Mail*
Website



By posting your answer, you agree to our comments policy.
What would you like to learn today?
Browse these popular technologies
Hibernate spring struts Servlets ajax Log4j jQuery Json Core Java Web Services AngularJs
Most Recent Tutorials
Hibernate_Logo Hibernate Recent Posts Spring_Logo Spring Recent Posts Struts_Logo Struts Recent Posts
Useful Links Current & UpComing Tutorials
Upcoming
  Web Services [ SOAP ], JSP
Contact | About Us | Privacy Policy | Advertise With Us

© 2010 - 2016 Java4s - Get It Yourself.
The content is copyrighted to Sivateja Kandula and may not be reproduced on other websites.