FJP Expt 5 Code
FJP Expt 5 Code
’S
Jayawantrao Sawant College of Engineering, Hadapsar, Pune-28
Department of Electronics and Telecommunication Engineering
Academic year (2022-23) Semester-I
Subject: Fundamentals of JAVA Programming Lab
}
System.out.println("Sorted list....");
for(i=0; i<n; i++)
System.out.println(" "+array[i]);
}
}
/* Sample Output:
Enter number of elements:
4
Enter integer numbers
3
1
5
7
Sorted list....
1
3
5
7
*/
{
public static void main(String[] args)
{
System.out.println("Enter your name:");
System.out.println("Enter your roll no:");
// storing input in variable
int n = 4;
// create string array called names
String names[]= { "Rahul", "Ajay", "Gourav", "Vinith" };
String temp;
for (int i = 0; i < n; i++)
{
for (int j = i + 1; j < n; j++)
{
/* Sample Output:
J.S.P.M.’S
Jayawantrao Sawant College of Engineering, Hadapsar, Pune-28
Department of Electronics and Telecommunication Engineering
Academic year (2022-23) Semester-I
Subject: Fundamentals of JAVA Programming Lab