Please avoid or flag spams/hateful comments. And do not spam. Enjoy :)
Code :-
import java.io.*;
import java.util.*;
class Tutorial
{
public static void main(String ar[])
{
//System.out.println("Unpossible POG");
Scanner sc=new Scanner(System.in);
//employee id first_name last_name salary location
System.out.println("Enter the ID of employee:");
String id=sc.nextLine();
System.out.println("Enter the first name of employee:");
String fn=sc.nextLine();
System.out.println("Enter the last name of employee:");
String ln=sc.nextLine();
System.out.println("Enter the salary of employee:");
String sl=sc.nextLine();
System.out.println("Enter the location of employee:");
String lc=sc.nextLine();
try
{
File f=new File("Database.txt");
PrintWriter pw=new PrintWriter(new FileOutputStream(f,true));
pw.append("\n"+id+","+fn+","+ln+","+sl+","+lc);
pw.close();
}
catch(Exception e){}
}
}
Subscribe my Channel:-
http://www.youtube.com/user/SanketRoo...
Facebook Page:-
/ unpossiblens
Twitter Account:-
/ unpossiblepog
Blog Account :-
http://unpossiblepog.blogspot.in/