i tried to execute this code but it is not running and getting the following error "Exception in thread "main" java.io.FileNotFoundException" and i don't know how to overcome..
class Showoccupancy{
public static void main(String args[]) throws FileNotFoundException
{
Scanner diskscanner = new Scanner(new File("Showoccupancy"));
System.out.println("Room \t guests");
for(int roomnum =0; roomnum<10; roomnum++)
{
System.out.print(roomnum);
System.out.print( " \t ");
System.out.print(diskscanner.nextInt());
}
}
}
can any one give solution for it?