I am writing a program it compiles but the code gives me a warning that it uses unchecked or unsafe operations.Recompile with -Xlint.I am unable to find the error.Please help me sort out this.

import java.io.*;
import java.util.*;
public class A1{

    private HashMap<String,ArrayList<Integer>> data= new HashMap<String,ArrayList<Integer>>();
    public  void main () throws IOException{
        BufferedReader ob=new BufferedReader(new InputStreamReader(System.in));
        int t = Integer.parseInt(ob.readLine());
        for(int i=0;i<t;i++){
            String a=ob.readLine();
            String spl[]= a.split(" ");
            ArrayList<Integer> inputs= new ArrayList<Integer>();
            for(int j=0;j<Integer.parseInt(spl[0]);j++){
            int prices=Integer.parseInt(ob.readLine());
            inputs.add(prices);
            }
            Collections.sort(inputs);
            data.put(spl[1],inputs);
        }
        Iterator iter = data.entrySet().iterator();
        while(iter.hasNext()){
            Map.Entry ele = (Map.Entry)iter.next();
            int fund=Integer.parseInt((String)ele.getKey());
            System.out.println(maxhouse(fund,(ArrayList<Integer>)ele.getValue()));
        }
    }
    int maxhouse(int fund,ArrayList<Integer> a){
        int sum=0;
        int c=0;
        for(int i=0;i<a.size();i++){
            sum=sum+a.get(i);
            if(sum<fund){
                c++;
            }
            else if(sum==fund){
                c++;
                break;
            }
            else{
                break;
            }
        }
        return c;
    }
}

Well you can do a couple of changes here, some as per the comments should never use RAW types. Hence change the iterator to -

Iterator<Entry<String, ArrayList<Integer>>> iter = data.entrySet().iterator();

and then change your Map.Entry to -

Entry<String, ArrayList<Integer>> ele = iter.next();

Also you can take advantage of java8 Map.foreach an lambda expressions to avoid all this and make the code even more better and presentable.

data.forEach((key,value) -> {
            int fund = Integer.parseInt(key);
            System.out.println(maxhouse(fund, value));
});

and avoid writing making the code more clean.

Iterator iter = data.entrySet().iterator();
while(iter.hasNext()){
 Map.Entry ele = (Map.Entry)iter.next();
 int fund=Integer.parseInt((String)ele.getKey());
 System.out.println(maxhouse(fund,(ArrayList<Integer>)ele.getValue()));
}

Does this answer your question? What is a raw type and why shouldn't we use it?

You are using Iterator and Map.Entry without type parameters. Never use raw types. You should provide the right type parameters.

Change to Iterator iter = data.entrySet().iterator(); to Iterator>> iter = data.entrySet().iterator(); and Map.Entry ele = (Map.Entry)iter.next(); to Entry> ele = iter.next(); To get rid of your raw types.

Did you recompile with -Xlint?

Thank you Sir now the error is gone I didn’t noticed it.

You can use forEach, but there really is no need to. An enhanced for loop is a better (simpler, more widely-available, probably faster, more powerful) choice.