Program 1:
import [Link];
import [Link];
import [Link];
public class Student {
public static void main(String args[]) throws Exception {
Scanner sc = new Scanner([Link]);
try {
FileWriter writer = new FileWriter("[Link]", true);
int choice = 1;
while (choice == 1) {
[Link]("Enter the Student Roll no (Ex 901) : ");
String roll = [Link]();
[Link]("Enter the Day : ");
String day = [Link]();
[Link]("Format of Time Ex :- 02:11 . Please enter 0 in front of single
digit time.");
[Link]("Enter the Time : ");
String time = [Link]();
String all = day + roll + time ;
[Link](all);
[Link]("If you want to add next student enter (1) or (0) to exit : ");
choice = [Link]();
[Link]();
[Link]();
} catch (IOException e) {
[Link]("An error occurred.");
[Link]();
}
}
}