Ede Internship Report PDF Form
Ede Internship Report PDF Form
in
CORE JAVA-EXPERT
December 2023
R. V. R. & J. C. COLLEGE OF ENGINEERING (Autonomous)
(NAAC A+ Grade) (Approved by AICTE)
(Affiliated to Acharya Nagarjuna University)
Chandramoulipuram::Chowdavaram,
Guntur - 522019, Andhra Pradesh, India.
R. V. R. & J. C. COLLEGE OF ENGINEERING
DEPARTMENT OF COMPUTER SCIENCE & BUSINESS SYSTEMS
BONAFIDE CERTIFICATE
This is to Certify that, this Internship Report entitled “Virtual Internship in Core Java-
Expert” is the bonafide work of Gonuguntla Yamini (Y20CB022) submitted in partial
fulfilment of requirements to CB451 Internship/Certification for the award of the Degree of
Bachelor of Technology in Computer Science & Business Systems to R. V. R. & J. C. College
of Engineering, during the year 2023 - 2024.
I would like to express my sincere gratitude to the following individuals, who have played a
crucial role in the successful completion of my internship on "Virtual Internship in Core
Java-Expert."
I am thankful to Dr. Kolla Srinivas, Principal of R.V.R &J.C College of Engineering, Guntur
for providing a supportive environment.
Furthermore, I would like to thank Hebeon Technologies for providing the opportunity.
Finally, I thank my project mates for cooperating in doing tasks perfectly during the internship.
This report presents the internship conducted by future skills prime on EXPERT JAVA. The
main motivation of this course is students are able to develop logic building problems and
software developments by using Java programming concepts.
Most of the software needs to develop an application which runs cross platform. Java is one of
the pioneer software tools used for cross platform development software. Java is the most
dominant software to develop web applications and distributed applications. This report
provides basic concepts about object oriented programming, java packages, exceptions.
In this Java report, I had the opportunity to gain hands-on experience in developing and
implementing java applications. Throughout the report I worked on various projects, including
creating user-friendly interfaces implementing data structures and optimizing code
performance.
After successful completion of this course learners are able to develop software modules for
real world problems.
1. INTRODUCTION
1.1 Java
The following are some of the features of Java:
Simple: Java is a simple programming language and easy to understand because it does not
contain complexities that exist in prior programming languages.
Platform Independent: Java allows programmers to write their program on any machine with
any configuration and to execute it on any other machine having different configurations.
Portable: The WORA (Write Once Run Anywhere) concept and platform-independent feature
make Java portable, which makes Java codes able to run on a wide variety hardware platforms
having the same interface.
Robust: The Java Programming language is robust, which means it is capable of handling
unexpected termination of a program. There are 2 reasons behind this, first, it has a most
important and helpful feature called Exception Handling. Another reason why Java is strong
lies in its memory management features.
Secure: Security is a fundamental aspect of Java. The language includes features like the
JVM’s security manager, which enforces security policies, and it provides protections against
various security vulnerabilities.
Interpreted: Java programming language uses both a compiler and an interpreter. Java
programs are compiled to generate bytecode files then JVM interprets the byte- code file during
execution. Along with this JVM also uses a JIT compiler.
Multi-Threaded: Java has built-in support for multi-threading, allowing programs to execute
multiple threads concurrently. This is essential for building responsive and efficient
applications.
1
a runtime environment. It is the implementation of JVM. It physically exists. It contains a set
of libraries + other files that JVM uses at runtime.
JDK: The Java Development Kit (JDK) is a software development environment which is
used to develop java applications and applets. It physically exists. It contains JRE +
development tools. JDK is an implementation of any one of the below given Java
Platforms released by Oracle corporation:
The JDK contains a private Java Virtual Machine (JVM) and a few other resources such
as an interpreter/loader (Java), a compiler (javac), an archiver (jar), a documentation
generator (Javadoc) etc. to complete the development of a Java Application.
2
JVM (Java Virtual Machine): JVM is an abstract machine. It is a specification that provides
a runtime environment in which java byte code can be executed. JVMs are available for many
hardware and software platforms (i.e. JVM is platform dependent). The JVM performs
following operation:
•Loads code
•Verifies code
•Executes code
•Memory area
•Register set
•Garbage-collected heap
3
1. Classloader: Classloader is a subsystem of JVM that is used to load class files.
2. Class(Method) Area: Class(Method) Area stores per-class structures such as the runtime
constant pool, field and method data, the code for methods.
4. Stack: Java Stack stores frames. It holds local variables and partial results, and plays a part
in method invocation and return. Each thread has a private JVM stack, created at the same time
as the thread. A new frame is created each time a method is invoked. A frame is destroyed
when its method invocation completes.
5. Program Counter Register: PC (program counter) register contains the address of the
4
2. BASIC CONCEPTS OF JAVA
2.1 Keywords
Keywords are words that have already been defined for the Java compiler. They have special
meaning for the compiler. Java Keywords must be in your information because it cannot be
used as a variable, class or a method name.
Data types specify the different sizes and values that can be stored in the variable. There are
two types of data types in Java:
1. Primitive data types: The primitive data types include Integer, Character, Boolean, and
Floating Point.
2. Non-primitive data types: The non-primitive data types include Classes, Interfaces, and
Arrays.
2.3 Variables
A variable is a container which holds the value and that can be changed during the execution
of the program. A variable is assigned with a datatype. Variable is a name of memory location.
All the variables must be declared before they can be used. There are three types of variables
in java: local variable, instance variable and static variable.
5
2.4 Operators
Operators in Java are the symbols used for performing specific operations in Java. There are
multiple types of operators in Java as mentioned below:
6
if
Switch
● Loop Statements: In programming, sometimes we need to execute the block of code
repeatedly while some condition evaluates to true. However, loop statements are used
to execute the set of instructions in a repeated order. The execution of the set of
instructions depends upon a particular condition.
For loop
Do while
While
● Jump Statements: Jump statements are used to transfer the control of the program to
the specific statements. In other words, jump statements transfer the execution control
to the other part of the program. There are two types of jump statements in Java, i.e.,
break and continue.
Break
Continue
7
3. OBJECT ORIENTED PROGRAMMING IN JAVA
8
variables and methods. An object’s method can change a variable’s value to prevent
accidental changes. These variables are called private variables. Class is the best
example of encapsulation as it wraps all the variables and function under a single class.
● Polymorphism: in Java is a concept by which we can perform a single action in
different ways. Polymorphism is derived from 2 Greek words: poly and morphs. The
word ”poly” means many and ”morphs” means forms. So polymorphism means many
forms. There are two types of polymorphism in Java: compile-time polymorphism and
runtime polymorphism. We can perform polymorphism in java by method overloading
and method overriding.
● Data Abstraction: is the process of hiding certain details and showing only essential
information to the user. Abstraction can be achieved with either abstract classes or
interfaces. The abstract keyword is a non-access modifier, used for classes and
methods: Abstract class: It is a restricted class that cannot be used to create objects (to
access it, it must be inherited from another class. Abstract method: It can only be used
in an abstract class, and it does not have a body. The body is provided by the subclass
(inherited from).
● Interface in Java: Another way to achieve abstraction in Java, is with interfaces. An
interface in Java is a blueprint of a class. It has static constants and abstract methods.
The interface in Java is a mechanism to achieve abstraction. There can be only abstract
methods in the Java interface, not method body. It is used to achieve abstraction and
multiple inheritance in Java.
● Exception Handling: One of the powerful mechanisms to handle the runtime errors so
that the normal flow of the application can be maintained. In Java, an exception is an
event that disrupts the normal flow of the program. It is an object which is thrown at
runtime. Exception Handling is a mechanism to handle runtime errors such as
ClassNotFoundException, IOException, SQLException, RemoteException, etc. The
core advantage of exception handling is to maintain the normal flow of the application.
An exception normally disrupts the normal flow of the application; that is why we need
to handle exceptions. Java try-catch block used to enclose the code that might throw an
exception. It must be used within the method. If an exception occurs at the particular
statement in the try block, the rest of the block code will not execute. So, it is
recommended not to keep the code in try block that will not throw an exception. Java
try block must be followed by either catch or finally block.
9
Syntax
try{
10
4. METHODS AND CONSTRUCTORS
4.1 Methods
Set of instructions to perform a particular or specific task is called a method. Is a set of
statements that is intended to perform a specific task. Provides encapsulation and is also
essential to refer to the data members and access them. Consists of two parts, method
declaration and method body.
● Predefined Method: In Java, predefined methods are the method that is already
defined in the Java class libraries is known as predefined methods. It is also known as
the standard library method or built-in method. We can directly use these methods just
by calling them in the program at any point.
● User-defined Method: The method written by the user or programmer is known
as a user-defined method. These methods are modified according to the
requirement.
4.2 Constructors
Constructor in java is a special type of method that Used to construct an object of a class and
initialize it. Java constructor is invoked at the time of object creation. Rules for creating java
constructor
Types of Constructors
11
4.3 Method Overloading
Method overloading allows a class to define multiple methods with the same name, but
different signatures. That is, it allows you to define different methods that have the same name,
but that respond to correspondingly different messages sent to an instance of the class.
12
5. PACKAGES IN JAVA
A package can be defined as a pack (group) of classes, interfaces and other packages. For
organizing classes and interfaces packages are used in java. Built-in packages and user-defined
packages are the types of packages. In this class notes we will learn what packages are, what
are user-defined packages in java and how to use them. In java we have several built-in
packages, for example when we need user input, we import a package like this: import
java.util.Scanner
Here:
● java is a top level package
● util is a sub package
● and Scanner is a class which is present in the sub package util. Types of packages
in Java
As mentioned in the beginning of this guide, we have two types of packages in java.
13
6. PROJECT
Source Code
import java.util.Scanner;
int option = 0;
while (option != 4) {
System.out.println("2. Deposit");
System.out.println("3. Withdraw");
System.out.println("4. Exit");
option = scanner.nextInt();
switch (option) {
case 1:
checkBalance();
break;
case 2:
14
deposit();
break;
case 3:
withdraw();
break;
case 4:
exit();
break;
default:
break;
15
balance += amount;
checkBalance();
System.out.println("Insufficient funds.");
} else {
balance -= amount;
checkBalance();
16
Output
1. Check Balance
2. Deposit
3. Withdraw
4. Exit
Enter an option: 1
1. Check Balance
2. Deposit
3. Withdraw
4. Exit
Enter an option: 2
1. Check Balance
2. Deposit
3. Withdraw
4. Exit
Enter an option: 3
17
$10000.0 has been withdrawn from your account.
1. Check Balance
2. Deposit
3. Withdraw
4. Exit
Enter an option: 1
1. Check Balance
2. Deposit
3. Withdraw
4. Exit
Enter an option: 4
18
7. CONCLUSION
Mastering Core Java is paramount for developers in their journey towards software
development excellence. This fundamental language, with its versatility and security features,
forms a robust foundation for building platform-independent solutions. Key concepts such as
the Java Virtual Machine (JVM) and Object-Oriented Programming principles provide the
necessary knowledge and skills to navigate evolving technologies. With the insights gained
from Core Java training, developers are well-equipped to meet the demands of the ever-
changing software development landscape.
19