import java.util.Scanner;
import java.util.ArrayList;
public class ListQues {
public static int find(ArrayList<Integer> list , int min , int max)
{
int count = 0;
for(int i =0 ; i<list.size();i++)
{
if(list.get(i)>= min && list.get(i) <= max)
{
count++;
}
}
return count;
}
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
System.out.println("Enter the size of list");
int size = sc.nextInt();
ArrayList<Integer> list = new ArrayList<>();
System.out.println("Enter the numbers");
for(int i =0; i<size;i++)
{
list.add(sc.nextInt());
}
System.out.println("Enter minimum and maximum value");
int min = sc.nextInt();
int max = sc.nextInt();
int ans = find(list , min , max);
System.out.println("Number of elements in between min and max are " + ans);
}<pre><pre lang="Java"><pre lang="Java"><pre><pre lang="Java"><pre lang="Java">
}