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 Placement Pipeline

Java Program to Sort an Given Array of Integers | Using For-Loop |Bubble sorting | StudyEcart | Sorting001

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
package in.studyecart.sorting.array;

public class NumberArray {
	public static void main(String[] args) {
		
	       int arr[]= {323,454,656,768,678,980,345,620};
	       
	       System.out.println("Before Sorting arr[]:");
	       for(int i=0;i<arr.length;i++) {
	    	   System.out.println(arr[i]);
	       }
	       
	       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