saving . . . saved Why the following error occurring in the following programs:- has been deleted. Why the following error occurring in the following programs:- has been hidden .
Why the following error occurring in the following programs:-
Title
Question
Prograam1=

https://drive.google.com/file/d/1WSmeDmY-joVLAUNekbRk6pnLmAK2Scww/view?usp=sharing
https://drive.google.com/file/d/1ZL-XFEBM29sJeBqgf28FI28GpcFun3F_/view?usp=sharing

Program2=
https://drive.google.com/file/d/1zORCvpCtLofL0-gF46I3VAl7YPF5cCLR/view?usp=sharing

https://drive.google.com/file/d/1ZL-XFEBM29sJeBqgf28FI28GpcFun3F_/view?usp=sharing



Java General None min None sec 23-06-22, 1:10 p.m. sc256356

Answers:

Program 1 : Array Instantiation is necessary before using it.
import java.io.*;
public class PoliceDATA
{
public static void main(String[] args) throws IOException
{
String s;
int marks[] = new int[7];
int i,a=0;
InputStreamReader isr= new InputStreamReader(System.in);
BufferedReader br=new BufferedReader(isr);
System.out.println("Please enter your marks out of 50 \n");
for(i=0;i<7;i++)
{
s=br.readLine();
marks[i]=Integer.parseInt(s);
}
System.out.println("These are your marks \n");
for(i=0;i<7;i++)
{
System.out.println(marks[i]);
}
}
}

Program 2:
Hint - Import libraries for FileNotFoundException and IOException.
26-06-22, noon pankajap@cse.iitb.ac.in


Log-in to answer to this question.