40% DISCOUNT LIMITED SEATS
Java Full Stack + AI Industrial Training 2026
Expert MNC Mentors • Industrial Roadmap • 10 Seats Left
GitHub
Month 01: Lab Setup

Java & GitHub

  • Java 21 & IntelliJ AI Mastery
  • GitHub Team Industrial Flow
  • MNC Standard VS Code Setup
Logic
Month 02: Logic Lab

Logic Mastery

  • Complex DSA with MNC Experts
  • Telugu & English Logic Bridge
  • Daily Problem Solving Drills
Backend
Month 03: API Hub

Spring & SQL

  • Spring Boot 3 Microservices
  • Postman API Automated Testing
  • PostgreSQL DB Architecture
Frontend
Month 04: UI Factory

React & Tailwind

  • React 18 & AI Component Dev
  • Industrial Tailwind UI Library
  • Redux State Management
Cloud
Month 05: Deploy

AWS & Jira Hub

  • Cloud Deploy on Real AWS
  • Agile Scrum with Jira Tools
  • Jenkins CI/CD Pipeline
Success
Month 06: Result

Job Offer Letter

  • Tier-1 MNC Direct Referrals
  • Salary Negotiation Strategy
  • High CTC Career Track

Java Program to Sort an Given Array of Integers (Scan from console ) | Using For-Loop |Bubble sorting |StudyEcart | Sorting002

Yogi Siddeswara 0
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
package in.studyecart.sorting.array;

import java.util.Scanner;

public class NumArrayScan {

	public static void main(String[] args) {
		
		Scanner input=new Scanner(System.in);
		
		System.out.println(">> Array -Number -Sorting <<");
		
		System.out.println("\nPlease Enter size of array:");
		int asize=input.nextInt();
		int arr[]=new int[asize];
		System.out.println("Please Enter "+asize +" of Elements into array: ");
		//Scanning the numbers from user console area
		for(int i=0;i<arr.length;i++) {
			arr[i]=input.nextInt();
		}
	
	       
	       int temp;
	       for(int i=0;i<arr.length;i++) {
	    	   
	    	   for(int j=1;j<arr.length-i;j++) {
	    		   
	    		   //if(arr[j-1]<arr[j]) { //Descending Order
	    		   if(arr[j-1]>arr[j]) { //Ascending Order
	    			   temp=arr[j-1];
	    			   arr[j-1]=arr[j];
	    			   arr[j]=temp;
	    			   
	    		   }
	    	   }
	    	  
	    	  
	       }
	       
	       System.out.println("\nAfter Sorting arr[]:");
	       for(int i=0;i<arr.length;i++) {
	    	   System.out.println(arr[i]);
	       }
		   
			
			
		}

	}

Post a Comment

0 Comments