Professional Documents
Culture Documents
Java Project
Java Project
BACHELOR OF TECHNOLOGY
IN
COMPUTER SCIENCE AND ENGINEERING
By
P.REVANTH Y.AKASH RAJ S.ABHISHEK
(Regd No: 19981A05D4) (Regd No: 19981A05H8) (Regd No: 19981A05F1)
M. SAI MANISH VARMA
(Regd No: 20985A0524)
Mr.Ch.Chakradhara Rao,
1
DEPARTMENT OF COMPUTER SCIENCE AND ENGINEERING
RAGHU ENGINEERING COLLEGE
(Autonomous)
Accredited by NAAC and NBA, Affiliated to JNTU-Kakinada
Dakamarri (V), Bheemunipatnam (M),
Visakhapatnam
CERTIFICATE
This is to certify that this project entitled "EMAIL ADMINISTRATION USING FILES AS
academic year 2020-2021 in partial fulfillment of the requirements for the completion of fourth
EXTERNAL EXAMINER
2
DECLARATION
This is to certify that this project titled “EMAIL ADMINISTRATION USING FILES
AS DATABASE” is bonafide work done by us, in partial fulfilment of the requirements for
the completion of fourth semester of the degree B.Tech and submitted to the Department of
We also declare that this project is a result of our own effort and that has not been
copied from anyone and we have taken only citations from the sources which are mentioned
in the references.
19981A05D4 19981A05H8
19981A05F1 20985A0524
3
TABLE OF CONTENTS
1 Project statement 6
2 Project description 7
6 References 23
4
EMAIL
ADMINISTRATION
USING FILES
AS
DATABASE
5
STATEMENT
6
DESCRIPTION
7
CONCEPTS USED
1. Switch case:
8
3.Loops (for, while,do while)
While Loop :
while (condition) {
statements;
Do-While loop
9
Syntax of Do-While Loop:
do {
statements
} while (expression);
For loop:
statements;
In Java, string equals() method compares the two given strings based
on the data/content of the string. If all the contents of both the strings
are same then it returns true. If all characters are not matched then it
returns false.
Classes:
10
A class is a user defined blueprint or prototype from which objects are
created. It represents the set of properties or methods that are common
to all objects of one type. In general, class declarations can include
these components,in order:
Modifiers: A class can be public or has default access (Refer this for
details).
Class name: The name should begin with an initial letter (capitalized
by convention). Superclass(if any): The name of the class’s parent
(superclass), if any,preceded by the keyword extends. A class can only
extend (subclass) one parent.
5. JAVA PACKAGES
sql etc.Here, we will have the detailed learning of creating and using
user-defined packages.
11
6. Java File Class
The File class have several methods for working with directories and
files such as creating new directories or files, deleting and renaming
directories or files, listing the contents of a directory etc.
First of all, we should create the File class object by passing the
filename or directory name to it. A file system may implement
restrictions to certain operations on the actual file-system object, such
as reading, writing, and executing. These restrictions are collectively
known as access permissions.Instances of the File class are immutable;
that is, once created, the abstractpathname represented by a File object
will never change.
12
SOURCE CODE
import java.io.*;
import java.lang.*;
import java.util.*;
String ch=B.readLine();
if(ch.equals("signup"))
13
System.out.print(" Username@gmail.com: ");
java.lang.String User=input.readLine();
java.lang.String Pass=input.readLine();
pout.println(Pass);
pout.close();
bout.close();
pout.close();
14
}
else
if(ch.equals("login"))
java.lang.String User=input.readLine();
java.lang.String Pass=input.readLine();
java.lang.String data=bout.readLine();
if(Pass.equals(data))
15
System.out.print(" Do you want to go to the inbox: (yes/no)");
java.lang.String Ask=input.readLine();
if(Ask.equals("yes"))
System.out.println("");
java.lang.String Composed;
int i=0;
while((Composed=b.readLine())!=null)
i++;
System.out.println(Composed);
System.out.println("");
b.close();
bout.close();
16
}
else
else
if(ch.equals("compose"))
Calendar c=Calendar.getInstance();
java.lang.String User1=input.readLine();
17
java.lang.String Pass=input.readLine();
java.lang.String data=bout.readLine();
if(Pass.equals(data))
java.lang.String User=input.readLine();
java.lang.String From=input.readLine();
System.out.println("");
java.lang.String Body=input.readLine();
18
FileWriter fin=new FileWriter(User);
System.out.println("");
pin.println("
Time:"+c.get(Calendar.HOUR)+":"+c.get(Calendar.MINUTE)+"
PM");
pin.println(Body);
System.out.println("");
bout.close();
pin.close();
bin.close();
pin.close();
else
19
}
else
20
1. SCREEN SHOTS
21
22
REFERENCES
● www.geekforgeeks.com
● www.projectgeek.com
● https//www.javapoint.com
● https//www.w3schools.com
23