Sort game------------------------

Can you suggest me rest of the approach--------------

import java.util.*;
public class Value {
public String name;
public int number;
}

public class Main {
public static void main(String args[]) {
Scanner cin = new Scanner(System.in);
int min = cin.nextInt(), n = cin.nextInt();
Value[] values = new Value[n];
for(int i =0;i<values.length;i++){
values[i] = new Value(cin.nextLine(), cin.nextInt());
}
for(int i = 0;i<values.length;i++){
for(int j =0;j<values.length-1-i;j++){
if(values[j].number>values[j+1].number){
int temp = values[i];
values[i] = values[i+1];
values[i+1] = temp;
}else if(values[j].number==values[j+1].number)
}
}
for(int i = 0;i<values.length;i++){
if(values[i].number>min){

	   }
   }
}

}

import java.util.*;
public class Value {
	String name;
	int number;
	//write constructor

	//write compare to function by implementing Comparator
}

public class Main {
	public static void main(String args[]) {
		Scanner cin = new Scanner(System.in);
		int min = cin.nextInt(), n = cin.nextInt();
		Value[] values = new Value[n];
		for(int i =0;i<values.length;i++){
			values[i] = new Value(cin.nextLine(), cin.nextInt());
		}

// for(int i = 0;i<values.length;i++){
// for(int j =0;j<values.length-1-i;j++){
// if(values[j].number>values[j+1].number){
// int temp = values[i];
// values[i] = values[i+1];
// values[i+1] = temp;
// }else if(values[j].number==values[j+1].number)
// }
// }


	//use collections.sort() function to sort the array

for(int i = 0;i<values.length;i++){
if(values[i].number>min){
		//print values[i]
	   }
   }
}
}

I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.

On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.