السلام عليكم ورحمة الله تعالى وبركاته
كيف احوالكم ان شاء الله بخير
من فضلكم مساعدتي في الإجابة على هذه الأسئلة في مادة base de données
import java.util.*;
import java.io.*;
public class Hello {
public static void main(String []args){
try{
for(;
{
System.out.print("Type your name \n:");
Scanner s=new Scanner(System.in);
String name=s.nextLine();
System.out.print("Type your email \n:");
String email=s.nextLine();
System.out.print("Type your phone \n:");
String phone=s.nextLine();
String line=name+","+email+","+phone;
FileWriter fs=new FileWriter("phonebook.csv",true);
BufferedWriter out= new BufferedWriter(fs);
out.write(line+"\n");
out.flush();
System.out.println("Record is inserted for: ");
}
}catch(Exception e){
e.printStackTrace();
}
}
}
Answer the following questions:
1- Why we put true at: FileWriter(“phonebook.csv”,true);
2- Explain the use of: try – catch
3- What’s the difference between: data end database.
et merci d'avance...
fi amen allah