A gripping String Bubble sort array program in java
String Bubble sort array program in Java: solved Java program for ICSE Class 10 Computer Applications with complete BlueJ code, explanation and sample output.
Design a program to create an array of strings, size should be entered by the user(between 5 to 20). And sort the string array in ascending order using the Bubble sort technique.
For more programs
An excellent String program to count words start and end with a vowel
import java.util.*;
class StringLinearSearch
{
public static void main()
{
Scanner sc=new Scanner(System.in);
System.out.println("Enter the size of array between 5 to 20");
int n=sc.nextInt();
String list[]=new String[n];
for(int i=0;i<n;i++)
{
System.out.println("Enter words");
list[i]=sc.next();
}
int len=list.length;
for(int i=0;i<len-1;i++)
{
for(int j=0;j<len-1-i;j++)
{
if((list[j].compareTo(list[j+1]))>0)
{
String temp=list[j];
list[j]=list[j+1];
list[j+1]=temp;
}
}
}
System.out.println("Sorted array");
for(int i=0;i<len;i++)
{
System.out.println(list[i]);
}
}
}Output:
Enter the size of array between 5 to 20
5
Nadiad
Madras
Bombay
Chennai
Agartala
Sorted array:
Agartala
Bombay
Chennai
Madras
Nadiad
For java videos click
https://www.youtube.com/user/trushna.tej
Related Posts
Continue learning with these related articles

Encapsulation, Access Specifiers and Scope of Variables in Java for ICSE Class 10
ICSE Class 10 Computer Applications notes on encapsulation: private, default, protected and public access, data hiding with getter and setter methods, instance vs static (class) variables, local variables and scope, with a solved BankAccount program.

ICSE Class 9 Computer Applications Sample Paper 2026-27 with Answers
A complete ICSE Class 9 Computer Applications sample paper for the 2026-27 annual exam covering OOP concepts, data types, operators, the Math class, conditional statements and loops, followed by full answers with explanations and solved Java programs.

Wrapper Classes and Character Methods in Java for ICSE Class 10
ICSE Class 10 Computer Applications notes on wrapper classes: primitive types and their wrappers, autoboxing and unboxing, parseInt and valueOf conversions, and Character class methods like isDigit, isLetter and toUpperCase, with output questions and a solved program.