Displaying Numbers in Ascending and Descending Order using array
Printing numbers in Ascending and Descending Order import java . util . Scanner ; //Calling Scanner Class public class Swap { public static void main(String []args) { //Declaring Variables int length ; int a =1; int i=0; System.out.println ("Enter length of array "); //Instruction for user length = new Scanner ( System.in ).nextInt(); //Getting value from user int num []= new int [ length ]; //Initializing array for( i=0; i< length ;i++) //loop for getting array from user { ...